Popular Posts

Monday, 4 June 2012

ssh-keygen Process

[root@test ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
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:
0d:f3:e2:dc:63:be:c9:dd:d3:0c:6c:16:62:6e:55:0e root@NDC-LVA-ePDSJB
[root@test ~]# cd .ssh/
[root@test .ssh]# ll
total 12
-rw------- 1 root root 1675 Jun  5 11:39 id_rsa
-rw-r--r-- 1 root root  401 Jun  5 11:39 id_rsa.pub
-rw-r--r-- 1 root root 1183 Apr 17 19:09 known_hosts
[root@test .ssh]# ssh-copy-id -i id_rsa.pub  (Remote IP)
root@Remote IP's password:

Now try logging into the machine, with "ssh "Remote IP'", and check in:  .ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.

[root@test.ssh]# ssh Remote IP

Last login: Mon Jun  4 16:18:03 2012 from Local IP

[root@test ~]# cd .ssh/
[root@test .ssh]# lltotal 8
-rw------- 1 root root 401 Jun  5 11:40 authorized_keys
-rw-r--r-- 1 root root 789 Apr  2 16:11 known_hosts

No comments:

Post a Comment