玄箱X4/サーバー設定/ssh

出典: Fukudat.com

インストール

# apt-get install ssh ssh-askpass

設定

  • 設定ファイル /etc/ssh/ssh_config のバックアップ
# cd /etc/ssh
# cp -p ssh_config ssh_config.orig

以下は,設定ファイル /etc/ssh/ssh_config を編集.

  • rootがsshでログインするのを禁止する.
PermitRootLogin no
  • Unixパスワードでのログインを禁止し,RSAとPublicKeyでのログインを許可する.
PasswordAuthentication no
IgnoreRhosts yes
RSAAuthentication yes
PubkeyAuthentication yes
  • 設定を変えたら,sshd を再起動.
# /etc/init.d/ssh restart