Login SSH Tanpa Password

1. Langkah pertama, buat key dulu
pinguin@ubuntu-hardy:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/pinguin/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/pinguin/.ssh/id_rsa.
Your public key has been saved in /home/pinguin/.ssh/id_rsa.pub.
The key fingerprint is:
06:cc:2d:c7:da:50:06:c5:78:35:39:3a:50:fc:12:ff pinguin@ubuntu-hardy


2. Taruh key tadi di komputer target
pinguin@ubuntu-hardy:~$ ssh-copy-id -i ~/.ssh/id_rsa.pub target@10.2.20.101
The authenticity of host '10.2.20.101 (10.2.20.101)' can't be established.
RSA key fingerprint is 27:99:0a:32:23:a2:59:75:29:b4:23:ce:63:e4:d9:c6.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.2.20.101' (RSA) to the list of known hosts.
target@10.2.20.101's password:
Now try logging into the machine, with "ssh 'target@10.2.20.101'", and check in:

.ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.


3. Testing
pinguin@ubuntu-hardy:~$ ssh target@10.2.20.101
Linux target-desktop 2.6.24-21-generic #1 SMP Tue Oct 21 23:43:45 UTC 2008 i686

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
Last login: Fri Jan 16 16:09:17 2009 from ubuntu-hardy.local
target@target-desktop:~$


Violla you've got the access

Login SSH Tanpa Password

1 komentar:

Anonim mengatakan...

dpt pelajaran baru nih, thanks