公開鍵を利用したssh接続設定
2011年10月14日公開鍵を利用して、ssh接続する設定と確認手順のメモ。
sshの設定変更
$ sudo vim /etc/ssh/sshd_config RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile^ .ssh/authorized_keys
sshdのリスタート
$ sudo /etc/rc.d/init.d/sshd restart
公開鍵作成
$ ssh-keygen -t dsa -N "" -f ~/.ssh/dsa $ cat ~/.ssh/dsa_pub ssh-dsa AAAA...
リモートへ公開鍵登録
$ vim ~/.ssh/authorized_keys ssh-rsa AAAA...
接続テスト
$ ssh -i ~/.ssh/dsa_pub some.where.remote