Saturday, August 13, 2011

Secure remote connection without password

If you ssh, scp and/or rsync very often and annoyed to enter the password every time, then this information is for you.
Execute the following command from your host machine as the usual user. This will generate a public-private key for this user on that host.
ssh-keygen
The keys will by default be created under ~/.ssh and usually named as id_rsa (private key) id_rsa.pub (public key)
Now the public key can be copied to any number of remote computers and all further secure log-ins to those hosts will not prompt for the password.
ssh-copy-id user@machine

No comments:

Post a Comment