Machine A | Machine B |
---|---|
yakoshi$ ssh-keygen -t dsa Generating public/private dsa key pair. Enter file in which to save the key (/home/yakoshi/.ssh/id_dsa):_ Enter passphrase (empty for no passphrase):********** Enter same passphrase again:********** Your identification has been saved in /home/yakoshi/.ssh/id_dsa. Your public key has been saved in /home/yakoshi/.ssh/id_dsa.pub. The key fingerprint is: 46:58:b0:be:3b:ed:2f:0c:54:59:45:c5:24:a7:7a:a6 yakoshi@umejima-2.ppp-bb.dion.ne.jp yakoshi$ scp ~/.ssh/id_dsa.pub student@localhost:yakoshi.pub student@localhost's password: id_dsa.pub 100% 622 0.6KB/s 00:00 ETA |
student$ cd ~ student$ mkdir .ssh student$ cat yakoshi.pub >> .ssh/authorized_keys student$ chmod 700 .ssh student$ chmod 600 .ssh/authorized_keys |
yakoshi$ ssh student@localhost Enter passphrase for key '/home/ycos/.ssh/id_dsa':********* #← パスフレーズが聞かれること Last login: Sat Dec 25 22:52:34 2010 from localhost.localdomain student$
#Protocol 2,1 Protocol 2 PermitRootLogin no PasswordAuthentication no