FreeBSD/SSHD鍵 の変更点


*sshでパスワードなしにログインするには [#r2df892e]

[[dokuwiki.fl8.jp転載済み>http://dokuwiki.fl8.jp/doku.php/01_linux/01_net/06_sshd%E9%8D%B5]]
**鍵作成 [#q1072458]
 $ ssh-keygen -t rsa ←RSA暗号方式の鍵を作成
 Generating public/private rsa key pair.
 Enter file in which to save the key (/home/nori/.ssh/id_rsa): ←[Enter]キー
 Enter passphrase (empty for no passphrase): ←パスフレーズを入力
 Enter same passphrase again: ←同じパスフレーズを入力
 Your identification has been saved in /home/nori/.ssh/id_rsa.
 Your public key has been saved in /home/nori/.ssh/id_rsa.pub.
 The key fingerprint is:
 f9:81:b6:c7:8f:b9:aa:3e:0e:c6:bd:35:19:a1:1e:06 nori@pandora

**公開鍵をコピー [#r3fff9b7]
以上で、$HOME/.ssh/ディレクトリに秘密鍵(id_rsa)と公開鍵(id_rsa.pub)が作成される。次に、公開鍵を~/.ssh/authorized_keysに追加し、パーミッションを600に変更する。

 $ cat id_rsa.pub >> $HOME/.ssh/authorized_keys
 $ chmod 600 $HOME/.ssh/authorized_keys