我正在尝试通过 SSH 连接到我在 GoDaddy 上新购买的网站。但是,当我尝试从 Mac 连接时,我收到以下错误消息:
$ssh [email protected] -v -v -v
OpenSSH_5.9p1, OpenSSL 0.9.8zg 14 July 2015
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to website.com [XXX.XXX.XXX.XXX] port 22.
debug1: Connection established.
debug1: identity file /Users/UserName/.ssh/id_rsa type -1
debug1: identity file /Users/UserName/.ssh/id_rsa-cert type -1
debug1: identity file /Users/UserName/.ssh/id_dsa type -1
debug1: identity file /Users/UserName/.ssh/id_dsa-cert type -1
ssh_exchange_identification: Connection closed by remote host
我第一次尝试连接时,系统提示我输入密码。我输入了密码,尽管密码显然是错误的。尝试几次后,系统不再要求我输入密码,而是开始显示上述消息。
这个问题有非常相似的错误消息,尽管它缺少行debug2: ssh_connect: needpriv 0
。我尝试了答案,但它们没有解决我的问题。
答案1
原来,在我多次登录失败后,主机屏蔽了我。在联系网络管理员并解除屏蔽后,我便可以毫无问题地通过 ssh 登录。