I've set up my VPS'ssh server to accept only key-based identification: I disabled password-based connection.
As a consequence I am connecting from home with an RSA key generated prior to password disabling on my VPS. Of course I've copied the public key into the ~/.ssh/authorized
file before that.
Now I want to do the same thing from work, generating a new key pair (I've read it is clearly better to generate a new key pair, one for each source of connection). I guess the best thing to do is to generate the key from my workplace. But then I am facing the issue of transferring the public key from my workplace to the VPS.
Since I disabled the password-based connection, I won't be able to transfer it directly from work.
I could re-enable password authentication just before returning to my workplace. And disable it from my workplace once I am able to connect into my VPS.
But then I would like to know: is it secure to send the public key by email to myself?