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