重启 Mac 之前无法连接到我的 VPS

重启 Mac 之前无法连接到我的 VPS

我在办公室使用 LAN。我可以正常连接到我的 VPS 主机。

但是当我回到家时(我的 Macbook 处于睡眠状态),使用 WLAN,我无法连接同一个主机。

不提示我输入密码。只告诉我“”

我尝试清除有关 SSH 的缓存:删除 ~/.ssh/know_hosts ; ssh-add -D (删除所有身份)。
不起作用。

但重新启动 Mac 后,一切都正常了。

# ssh [email protected] -v
OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /Users/Lijicheng/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug1: Applying options for *
debug1: Connecting to 199.119.ip.ip [199.119.ip.ip] port 22.
debug1: Connection established.
debug1: identity file /Users/Lijicheng/.ssh/id_rsa type 1
debug1: identity file /Users/Lijicheng/.ssh/id_rsa-cert type -1
debug1: identity file /Users/Lijicheng/.ssh/id_dsa type -1
debug1: identity file /Users/Lijicheng/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.6
Address 199.119.ip.ip maps to unassigned.psychz.net, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!

(After a long waitting... )

Connection closed by 199.119.ip.ip

当我回到办公室时,情况是这样的:

ssh [email protected] -v
OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /Users/Lijicheng/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug1: Applying options for *
debug1: Connecting to 199.119.ip.ip [199.119.ip.ip] port 22.
debug1: Connection established.
debug1: identity file /Users/Lijicheng/.ssh/id_rsa type 1
debug1: identity file /Users/Lijicheng/.ssh/id_rsa-cert type -1
debug1: identity file /Users/Lijicheng/.ssh/id_dsa type -1
debug1: identity file /Users/Lijicheng/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.6
reverse mapping checking getaddrinfo for unassigned.psychz.net [199.119.ip.ip] failed - POSSIBLE BREAK-IN ATTEMPT!
debug1:  Miscellaneous failure (see text)
PROCESS_TGS

debug1:  An invalid name was supplied
unknown mech-code 0 for mech 1 2 752 43 14 2

debug1:  Miscellaneous failure (see text)
unknown mech-code 0 for mech 1 3 6 1 5 5 14

debug1:  An unsupported mechanism was requested
unknown mech-code 0 for mech 1 3 5 1 5 2 7

debug1:  Miscellaneous failure (see text)
unknown mech-code 0 for mech 1 3 6 1 5 2 5

debug1: Offering GSSAPI proposal: gss-gex-sha1-4s+AAtlALj0s3Z3xGjNXPQ==,gss-group1-sha1-4s+AAtlALj0s3Z3xGjNXPQ==,gss-group14-sha1-4s+AAtlALj0s3Z3xGjNXPQ==
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
The authenticity of host '199.119.ip.ip (199.119.ip.ip)' can't be established.
RSA key fingerprint is 33:16:1a:aa:fd:6f:b4:57:dc:e8:93:a3:23:32:e4:36.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '199.119.ip.ip' (RSA) to the list of known hosts.
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug1: Next authentication method: gssapi-with-mic
debug1:  Miscellaneous failure (see text)
PROCESS_TGS

debug1:  An invalid name was supplied
unknown mech-code 0 for mech 1 2 752 43 14 2

debug1:  Miscellaneous failure (see text)
unknown mech-code 0 for mech 1 3 6 1 5 5 14

debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1:  An unsupported mechanism was requested
unknown mech-code 0 for mech 1 3 5 1 5 2 7

debug1:  Miscellaneous failure (see text)
unknown mech-code 0 for mech 1 3 6 1 5 2 5

debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/Lijicheng/.ssh/id_rsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: /Users/Lijicheng/.ssh/id_dsa
debug1: Next authentication method: password
[email protected]'s password: 

相关内容