Hi to login into Linux System through SSH with out password Follow Below Steps
two systems (Below IP addresses are for Example)
system1 ip : 2.2.2.2
system2 ip : 3.3.3.3
Note: For Below Command don't type any thing Simply press Enter
root@system1:~# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): (Press Enter)
Enter passphrase (empty for no passphrase): (Press Enter)
Enter same passphrase again: (Press Enter)
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
d8:b7:3b:d8:12:19:47:de:43:e9:8b:54:ba:b4:af:c4 root@system1
The key's randomart image is:
+--[ RSA 2048]----+
| .. |
| ...o |
| .+* . |
| o oo* . |
| . S .... |
| + +.+. |
| oE.o |
| ..oo |
| o. |
+-----------------+
root@system1:~# ssh-copy-id 3.3.3.3
root@3.3.3.3's password:
Now try logging into the machine, with "ssh '3.3.3.3'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
root@system1:~# ssh 3.3.3.3
(If Login success OK,if Login Fail and Got Below Error )
Agent admitted failure to sign using the key.
root@3.3.3.3's password:
root@system1:~# ssh-add
Identity added: /root/.ssh/id_rsa (/root/.ssh/id_rsa)
Now
root@system1:~# ssh 3.3.3.3
Last login: Wed Nov 7 10:27:23 2012 from 2.2.2.2
root@system2:~#
Success
two systems (Below IP addresses are for Example)
system1 ip : 2.2.2.2
system2 ip : 3.3.3.3
Note: For Below Command don't type any thing Simply press Enter
root@system1:~# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): (Press Enter)
Enter passphrase (empty for no passphrase): (Press Enter)
Enter same passphrase again: (Press Enter)
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
d8:b7:3b:d8:12:19:47:de:43:e9:8b:54:ba:b4:af:c4 root@system1
The key's randomart image is:
+--[ RSA 2048]----+
| .. |
| ...o |
| .+* . |
| o oo* . |
| . S .... |
| + +.+. |
| oE.o |
| ..oo |
| o. |
+-----------------+
root@system1:~# ssh-copy-id 3.3.3.3
root@3.3.3.3's password:
Now try logging into the machine, with "ssh '3.3.3.3'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
root@system1:~# ssh 3.3.3.3
(If Login success OK,if Login Fail and Got Below Error )
Agent admitted failure to sign using the key.
root@3.3.3.3's password:
root@system1:~# ssh-add
Identity added: /root/.ssh/id_rsa (/root/.ssh/id_rsa)
Now
root@system1:~# ssh 3.3.3.3
Last login: Wed Nov 7 10:27:23 2012 from 2.2.2.2
root@system2:~#
Success
No comments:
Post a Comment