![mojave 更新后无法持续 ssh 进入服务器](https://linux22.com/image/1582212/mojave%20%E6%9B%B4%E6%96%B0%E5%90%8E%E6%97%A0%E6%B3%95%E6%8C%81%E7%BB%AD%20ssh%20%E8%BF%9B%E5%85%A5%E6%9C%8D%E5%8A%A1%E5%99%A8.png)
自从更新到 macOS Mojave 后,我就无法再通过 ssh 持续登录我所在机构的服务器了。通常,在我输入 ssh 命令后,什么都不会发生——没有登录,没有提示输入密码,没有失败/超时消息。但是,在一些尝试中,我确实会收到输入密码的提示,并且可以正常登录。这是我得到的调试跟踪:
OpenSSH_7.7p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/admin/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to foo.cis.jhu.edu port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /Users/admin/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/admin/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/admin/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/admin/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/admin/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/admin/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/admin/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/admin/.ssh/id_ed25519-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/admin/.ssh/id_xmss type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/admin/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.5
debug1: match: OpenSSH_6.5 pat OpenSSH_6.5*,OpenSSH_6.6* compat 0x14000000
debug1: Authenticating to foo.cis.jhu.edu:22 as 'mlu'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group-exchange-sha1
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(2048<8192<8192) sent
debug1: got SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: got SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: ssh-ed25519 SHA256:UaOaJcW0TqCgqHSs/9DBvznDy714FRbcfyo0Rmw4kao
debug1: Host 'foo.cis.jhu.edu' is known and matches the ED25519 host key.
debug1: Found key in /Users/admin/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/admin/.ssh/id_rsa
debug1: Trying private key: /Users/admin/.ssh/id_dsa
debug1: Trying private key: /Users/admin/.ssh/id_ecdsa
debug1: Trying private key: /Users/admin/.ssh/id_ed25519
debug1: Trying private key: /Users/admin/.ssh/id_xmss
debug1: Next authentication method: password