当我这样做时,ssh root@ip_adress
我需要等待 7-8 秒才能收到密码请求。当我使用密钥时也会发生这种情况。
我确信这不是服务器端的问题(Centos 或 Debian 立即连接到同一台服务器)。以下是我解决问题的方法:
从 /etc/pam.d/login 和 /etc/pam.d/sshd 中删除了“sessionoptionalpam_motd.so” 在 /etc/pam.d/sshd 中使用 DNS 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
。