There are plenty of tutorials about passwordless ssh login to remote machines. Here is a simple guide:
1. @local: Generate rsa key-pair (skip this step if it exists) with #ssh-keygen -t rsa
2. @local: Append the content in .ssh/id_rsa.pub to .ssh/authorized_keys on remote server
#cat $HOME/.ssh/id_rsa.pub | ssh USER@REMOTE 'cat >> $HOME/.ssh/authorized_keys'
3. DONE
Additional notes:
SSH has a restricted requirement on the permission of $HOME directory on the remote machine. Here is something you need to check if the above method fails:
@remote: #chmod 755 $HOME
@remote: #chmod 700 $HOME/.ssh
@remote: #chmod 744 $HOME/.ssh/authorized_keys
No comments:
Post a Comment