SSH without password Linux/Unix

Uncomment the following lines from the /usr/local/etc/ssh_config (or /etc/ssh/ssh_config) file:
RSAAuthentication yes
IdentityFile ~/.ssh/id_rsa

Now, let’s assume ServerA and ServerB both run the ssh daemons.To allow ServerA to SSH to ServerB without password,

please try the following:

# ssh-keygen -t rsa

This generates two files id_rsa.pub and id_rsa

Now, this needs to be copied to the authorized_keys file on ServerB

# scp id_rsa.pub ServerB:~/.ssh/ServerA_rsa.pub
# cat ServerA_rsa.pub >> authorized_keys

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s