SSH連線速度非常慢

SSH連線速度非常慢

當我這樣做時,ssh root@ip_adress我會在 7-8 秒的等待中收到密碼請求。當我用鑰匙做的時候也會發生這種情況。

我確定這不是伺服器端問題(Centos 或 Debian 立即連接到同一台伺服器)。這就是我解決問題所採取的方法:

從 /etc/pam.d/login 和 /etc/pam.d/sshd 中刪除了“會話可選 pam_motd.so” /etc/pam.d/sshd 中的 UseDNS no 並且它不起作用

*對不起我的英文不好

當我開始/usr/sbin/sshd -d -d -d時,ssh -v host我得到了這個:

debug1: No valid Key exchange context   debug1: Next authentication method: gssapi-with-mic 
**WAIT 3-4 Sec**
debug1: Unspecified GSS failure. Minor code may provide more       information No Kerberos credentials available
**WAIT 2-3 Sec**      
debug1: Unspecified GSS failure. Minor code may provide more       information No Kerberos credentials available W debug1: Unspecified  GSS failure. Minor code may provide more information 
**WAIT 2-3 Sec**   
debug1: Unspecified GSS failure. Minor code may provide more       information No Kerberos credentials available 
**WAIT 2-3 Sec**     
debug1: Next authentication method: publickey 
debug1: Offering RSA       public key: /root/.ssh/id_rsa debug1: Authentications that can       continue: publickey,gssapi-keyex,gssapi-with-mic,password 
debug1:       Trying private key: /root/.ssh/id_dsa debug1: Trying private key:       /root/.ssh/id_ecdsa debug1: Trying private key: /root/.ssh/id_ed25519

答案1

GSSAPIAuthentication no透過添加到解決了問題/etc/ssh/ssh_config

相關內容