当我这样做时,ssh root@ip_adress我通过 7-8 秒的等待收到密码请求。当我用钥匙做它时也会发生这种情况。
我确定这不是服务器端问题(Centos 或 Debian 立即连接到同一台服务器)。这就是我解决问题的方法:
从 /etc/pam.d/login 和 /etc/pam.d/sshd 中删除了 «session optional pam_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
Run Code Online (Sandbox Code Playgroud)