Wednesday, October 14, 2009

SSH without password.

[tatshuya]# ssh-keygen -t dsa -b 1024

Generating public/private rsa key pair.
Enter file in which to save the key (/home/tatshuya/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:

[tatshuya]# ls -al .ssh
-rw------- 1 tatshuya tatshuya 887 Oct 14 04:20 id_rsa
-rw-r--r-- 1 tatshuya tatshuya 244 Oct 14 04:20 id_rsa.pub

*** Then copy public key 'id_rsa.pub' to remote host and rename to 'authorized_keys'
[tatshuya]# scp /home/tatshuya/.ssh/id_rsa.pub tatshuya@remotehost:.ssh/authorized_keys

*** Test connection by ssh
[tatshuya]# ssh remotehost
Last login: Wed Oct 14 16:10:47 2009 from 10.10.10.2
You have new mail.
[remotehost]#



-- TaTsHuYa --

No comments: