Home > security, server > How to exchange ssh keys for passwordless login

How to exchange ssh keys for passwordless login

As I’m always using ssh, copying or rsyncing files between all my servers I find it very annoying to always have to type in my login password. To avoid that, I exchanged my ssh keys so that all the authentication is done through those keys. To achieve that simply:

On the machine you want to have access from:

1. Generate a new key if you don’t already have one:

$ ssh-keygen

2. Copy the key accross to the other server:

$ cat ~/.ssh/id_rsa.pub | ssh user@target_machine cat - ">>" ~/.ssh/authorized_keys

Now when you want to ssh or scp or rsync user@target_machine you won’t need to use a password any more!

http://blog.melimato.com/wp-content/plugins/sociofluid/images/digg_24.png http://blog.melimato.com/wp-content/plugins/sociofluid/images/reddit_24.png http://blog.melimato.com/wp-content/plugins/sociofluid/images/stumbleupon_24.png http://blog.melimato.com/wp-content/plugins/sociofluid/images/delicious_24.png http://blog.melimato.com/wp-content/plugins/sociofluid/images/technorati_24.png http://blog.melimato.com/wp-content/plugins/sociofluid/images/google_24.png http://blog.melimato.com/wp-content/plugins/sociofluid/images/myspace_24.png http://blog.melimato.com/wp-content/plugins/sociofluid/images/facebook_24.png http://blog.melimato.com/wp-content/plugins/sociofluid/images/yahoobuzz_24.png http://blog.melimato.com/wp-content/plugins/sociofluid/images/twitter_24.png http://blog.melimato.com/wp-content/plugins/sociofluid/images/meneame_24.png
Categories: security, server Tags: , , , , , , ,
  1. No comments yet.
  1. No trackbacks yet.

Comment moderation is enabled. Your comment may take some time to appear.

Additional comments powered by BackType