How to: Add ssh keys easily to another machine

I’ve had a few servers I was logging in using username and password and I kind of liked how Azure uses an ssh key for logging in (plus the fact it is more secure) so I decided to install my ssh key on all our servers. The ssh-copy-id command (in the openssh-client package and installed by default) does exactly this:

ssh-copy-id [email protected]

copies the public key of your default identity (use -i identity_file for other identities) to the remote host.

This makes life so much easier, as it makes you log in, checks the key is not already present on the destination server, copies over the key and all! Just the kind of thing I love :3

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: