CentOS 5へのSSHログインが遅い
puttyからCentOS 5.3にSSH接続してlogin asプロンプトにユーザ名を入力すると、数十秒待ってようやく「Access denied」というメッセージとともにpasswordプロンプトが出てくる。関係する設定は2箇所ある。ひとつは/etcv/ssh/sshd_configのuseDNSパラメータである。CentOS 5.3デフォルトの設定ファイルで「#UseDNS yes」とコメントアウトされているが、キーワード未設定時のデフォルト値はyesである。これは接続先の名前とIPアドレスをダブルチェックするためのものだ。ラボ環境などでDNSが整備されてない場合はnoにする。
UseDNS
Specifies whether sshd should look up the remote host name and check that the resolved host name for the remote IP address maps back to the very same IP address. The default is “yes”.
(sshd_config (5)のmanページ)
この設定でログインの待ち時間がなくなるが、「Access denied」が相変わらず出てくる。これはputtyがデフォルトでGSSAPI認証を要求するためである(SSH-2の場合)。さらにCentOS 5.3は「GSSAPIAuthentication yes」とsshd_configに書いてあり、これを許可する。どちらかの設定を変えて、GSSAPI認証を試行しないようにすれば良い。puttyの場合は、設定ツリーをConnection → SSH → Auth → GSSAPIと展開し、「Attempt GSSAPI authentication (SSH-2 only)」のチェックボックスを外せばよい。
GSSAPIAuthentication
Specifies whether user authentication based on GSSAPI is allowed. The default is “no”. Note that this option applies to protocol version 2 only.
(sshd_config (5)のmanページ)
| 固定リンク
この記事へのコメントは終了しました。
コメント