我与服务器的 ssh 连接失败。这是连接的输出
$ ssh -v [server]
OpenSSH_5.1p1 Debian-3ubuntu1, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /home/tim/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to [server] [server ip] port 22.
debug1: Connection established.
debug1: identity file /home/tim/.ssh/identity type -1
debug1: identity file /home/tim/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/tim/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host`
有谁知道怎么了?谢谢并恭祝安康!
检查您连接的 IP 是否显示在
/etc/hosts.deny
远程服务器上,并检查您是否在/var/log/secure
. 如果这样做,请从两个文件中删除这些条目,您有时可以重新进入。sh_exchange_identification:即使密钥正确,连接也会被远程主机关闭
通过控制台登录或尝试在 ssh 中多次登录
然后检查 /var/log/btmp 的权限必须是 600 chmod 600 /var/log/btmp
另外,请尝试在不使用您的私钥的情况下登录。我知道这样做的唯一方法是暂时移开您的私钥文件。