DOYENSYS Knowledge Portal




We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal




Thursday, September 10, 2015

Password less SSH Configuration

Setup SSH for password less access

Run this on Both the Nodes

ssh-keygen -t dsa

Generating public/private dsa key pair.
Enter file in which to save the key (/home/applmgr/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/applmgr/.ssh/id_dsa.
Your public key has been saved in /home/applmgr/.ssh/id_dsa.pub.
The key fingerprint is:
bc:8a:db:94:46:0b:02 applmgr@domainname


ssh-keygen -t rsa

Generating public/private rsa key pair.
Enter file in which to save the key (/home/applmgr/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/applmgr/.ssh/id_rsa.
Your public key has been saved in /home/applmgr/.ssh/id_rsa.pub.
The key fingerprint is:
0b:1c:15:ec:51:93:b4:9f:ef:b3:c8:92:d0:5e:28:32 applmgr@domainname

Goto $HOME/.ssh

cat id_dsa.pub >> authorized_keys
cat id_rsa.pub >> authorized_keys


Repeat the process on all the nodes and scp authorized_keys to other node and

cat id_dsa.pub >> authorized_keys
cat id_rsa.pub >> authorized_keys

Now Scp the authorized_keys to the previous node and replace the existing file
 
(Now the authorized_keys will be having the entry of RSA and DSA keys from both the nodes) 
 
 
Now Check whether it is working
 
On Node1
ssh date Node2
 
It will display the date from Node2
 
and on Node2 with 

ssh date node1

No comments: