SSH without password
February 22nd, 2005
This is a sort of a personal reminder. I can’t remember these simple step, so i decided to write them in this post. This simple tutorial show you how to login on a remote machine without password. (Usefull for my scheduled rsync over ssh backups)
1. Login on the local machine
2.Now generate public/private keys
[user@local]#ssh-keygen -t dsa -f .ssh/id_dsa
3. Now cd to .ssh dir and copy the public key on remote machine
[user@local]#cd .ssh
[user@local]#scp id_dsa.pub user@remote:~/.ssh/id_dsa.pub
4. Now, login into the server machine and go to the .ssh directory on the server side
[user@local]# ssh user@remote
[user@remote]#cd .ssh
5. Finally add the client’s public key to the know public keys on the server
[user@remote]# cat id_dsa.pub >> authorized_keys
[user@remote]#chmod 640 authorized_keys
[user@remote]#rm id_dsa.pub
[user@remote]#exit
Now you can login via ssh without password. If you wish to set up on multiple machines just start from p.3.
Check ssh manual for more infos.
Leave a Reply