SSH PASSWORD LESS AUTHENTICATION SETUP GUIDE

How to setup a password less SSH connection.

Situation:
User need to connect from SYS1 to SYS2 and SYS3 without password.

1. Run ssh-keygen command on SYS1 to generate Public and Private Key

ssh-keygen -t dsa -b 2048 -N “” -f /home/system/john/.ssh/id_rsa
File to be created in <home>/.ssh/id_rsa
<home>/.ssh/id_rsa.pub

2. Now add the content from id_rsa.pub created in SYS1 to all the other nodes (SYS2 & SYS3) to respective location as below.
/etc/ssh/authorized_keys/<userid>
While copying the content make sure it is in single line (word wrap off)

3. Private file (id_rsa) should have permission 600 and should be stored secure in SYS1 alone.

4. We can also change passphrase of private key by using command ssh-keygen -p -f ~/.ssh/id_rsa.

Add Comment