日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

解决linux ssh客户端SSH连接linux服务器很慢的问题

發布時間:2025/6/15 linux 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 解决linux ssh客户端SSH连接linux服务器很慢的问题 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

在linux上使用ssh客戶端連接另一臺的linux服務器時,出現了連接慢的情況。但是換一臺客戶端去連發現速度正常。推測ssh客戶端出現為問題。


于是使用使用ssh -v ?IP 調試,果然發現問題。輸出如下:

[root@jump1 ~]# ssh -v 10.60.9.32

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 10.60.9.32 [10.60.9.32] port 22.

debug1: Connection established.

debug1: permanently_set_uid: 0/0

debug1: identity file /root/.ssh/identity type -1

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?


再去試一下,速度正常了

轉載于:https://blog.51cto.com/koala003/1689914

總結

以上是生活随笔為你收集整理的解决linux ssh客户端SSH连接linux服务器很慢的问题的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。