SSH接続カートン
1.DNS逆解析をオフにします。linuxでは、デフォルトではSSHの逆DNS解析が開かれています。これは時間がかかりますので、シャットダウンが必要です。
2.SERVER上のGSS認証をオフにします。authentication gssaphi-with-micでは大きな問題が発生する可能性がありますので、GSS認証をオフにするとssh接続速度が向上します。
# vi /etc/ssh/sshd_config
UseDNS=no
設定ファイルでは、UseDNS yesは注釈されていますが、デフォルトのスイッチはyesです。2.SERVER上のGSS認証をオフにします。authentication gssaphi-with-micでは大きな問題が発生する可能性がありますので、GSS認証をオフにするとssh接続速度が向上します。
# vi /etc/ssh/sshd_config
GSSAPIAuthentication no
注意:修正後、sshdサービスを再起動してください。service sshd restart
備考:sshリンクカードをテストして、そこにあります。[xiao@localhost ~]$ ssh -v [email protected]
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 192.168.174.149 [192.168.174.149] port 22.
debug1: Connection established.
debug1: identity file /home/xiao/.ssh/identity type -1
debug1: identity file /home/xiao/.ssh/identity-cert type -1
debug1: identity file /home/xiao/.ssh/id_rsa type -1
debug1: identity file /home/xiao/.ssh/id_rsa-cert type -1
debug1: identity file /home/xiao/.ssh/id_dsa type -1
debug1: identity file /home/xiao/.ssh/id_dsa-cert type -1
debug1: identity file /home/xiao/.ssh/id_ecdsa type -1
debug1: identity file /home/xiao/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha1 none
debug1: kex: client->server aes128-ctr hmac-sha1 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<2048<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
The authenticity of host '192.168.174.149 (192.168.174.149)' can't be established.
RSA key fingerprint is 01:e2:4c:36:39:b6:5a:de:28:87:92:1d:6a:74:2a:e0.
Are you sure you want to continue connecting (yes/no)?
Warning: Permanently added '192.168.174.149' (RSA) to the list of known hosts.
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
Cannot determine realm for numeric host address
debug1: Unspecified GSS failure. Minor code may provide more information
Cannot determine realm for numeric host address