Enabling SSH authorization so that you don’t need to type in password every time

Filed Under (Tips) by Mozammel on 17-05-2007

Tagged Under :

It is quite annoying if you need to ssh to a box very frequently and you need to put in the password every single time. To solve that you can use the following procedure:

Let’s assume you want to ssh from #1 box to #2 box and don’t want to type in your password for #2 every time.

1. First create your public key using “ssh-keygen -t dsa” command
2. This will create two files, namely id_dsa and id_dsa.pub under $home/.ssh directory.
3. Then copy (scp) your id_dsa.pub file to #2 box.
4. Now login to #2 and copy the contents of id_dsa.pub to .ssh/authorized_keys file. You can use this command: cat id_dsa.pub > authorized_keys.

That’s all!

Make a comment