在linux上使用ssh客戶端鏈接另外一臺的linux服務器時,出現了鏈接慢的狀況。可是換一臺客戶端去連發現速度正常。推測ssh客戶端出現爲問題。linux
因而使用使用ssh -v IP 調試,果真發現問題。輸出以下:web
[root@jump1 ~]# ssh -v 10.60.9.32api
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013服務器
debug1: Reading configuration data /etc/ssh/ssh_configapp
debug1: Applying options for *ssh
debug1: Connecting to 10.60.9.32 [10.60.9.32] port 22.ide
debug1: Connection established.ui
debug1: permanently_set_uid: 0/0spa
debug1: identity file /root/.ssh/identity type -1debug
debug1: identity file /root/.ssh/identity-cert type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH_4*
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-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<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
debug1: Host '10.60.9.32' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:9
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-with-mic,password
debug1: Next authentication method: gssapi-with-mic
可在最後一條,應該和「 gssapi-with-mic」有關,通過排查,終於發現問題,果真是ssh客戶端文件有問題。是ssh客戶端鏈接時會進行反向查詢所致。
修改方法以下:
修改本機的客戶端配置文件ssh_config,注意,不是ssh_config
vi /etc/ssh/ssh_config
找到
GSSAPIAuthentication yes
改成
GSSAPIAuthentication no
再去試一下,速度正常了
若是想深刻體驗LINUX系統的新手,也能夠先下載一個方德Linux軟件中心試用一下。
免費下載地址:http://www.nfs-cloud.cn:81/appCenter/open/softcenter