4. This will create the file “id_rsa.pub” under the .ssh directory.
[manmohan@kalwa1 .ssh]$ ll total 8 -rw------- 1 manmohan manmohan 1675 Jun 27 22:41 id_rsa -rw-r--r-- 1 manmohan manmohan 406 Jun 27 22:41 id_rsa.pub
5. Now copy this file “id_rsa.pub” from kalwa1(192.168.216.130). to kalwa2(192.168.216.131) using scp command or whichever method you prefer.
scp -pr id_rsa.pub manmohan@192.168.216.131:/home/manmohan/.ssh/
6. Now logon to the system kalwa2(192.168.216.131) with manmohan user.
7. Go to directory .ssh and execute below command.
cat id_rsa.pub >.ssh/authorized_keys
make sure this file “authorized_keys” has permission 700.
8. Now If you try login from kalwa1(192.168.216.130). to kalwa2(192.168.216.131) it will not asks for any password … mission completed!!!!
[manmohan@kalwa1 ~]$ ssh 192.168.216.131 Last login: Tue Aug 4 07:10:49 2015 from 192.168.216.130 [manmohan@kalwa2 ~]$
BI says
For point 5; You can also use the ssh-copy-id command
source_server# ssh-copy-id destination_server
admin says
THanks for your comment!!!