Connection From server1 to server2
1. Create dsa key on server1 and take default settings, do not enter a passphrase.
Now you can ssh from server1 to server2 with out password or passphrase.
1. Create dsa key on server1 and take default settings, do not enter a passphrase.
[root@server1 /]# ssh-keygen -t dsa2. Copy key from server1 to server2.
[root@server1 /]# scp /root/.ssh/id_dsa.pub root@server2:/root/id_dsa.pub3. ssh to server 2:
[root@server1 /]# ssh root@server24. Change to the /root/.ssh or if it does not exist create .ssh directory
[root@server2 /]# mkdir /root/.ssh -p5. create authorzed_keys file
[root@server2 /]# cat /root/id_dsa.pub >>/root/.ssh/authorized_keys6. Change the permissions so that the owner has read,write and the group and other has only read
[root@server2 /]# chmod 644 /root/.ssh/authorized_keys
Now you can ssh from server1 to server2 with out password or passphrase.
No comments:
Post a Comment