SSH 在 macOS Mojave 10.14.1 上失败

SSH 在 macOS Mojave 10.14.1 上失败

更新到 Mojave 10.14.1 后,所有 ssh 连接都失败:终端 ssh、scp、git 等都出现“管道断开”的情况:

 ssh myserver -v
 OpenSSH_7.8p1, LibreSSL 2.7.3
 debug1: Reading configuration data /Users/pablo/.ssh/config
 debug1: /Users/pablo/.ssh/config line 137: Applying options for myserver
 debug1: Reading configuration data /etc/ssh/ssh_config
 debug1: /etc/ssh/ssh_config line 48: Applying options for *
 debug1: Connecting to myserver port 22.
 debug1: Connection established.
 debug1: identity file /Users/pablo/.ssh/myserver.pem type -1
 debug1: identity file /Users/pablo/.ssh/myserver.pem-cert type -1
 debug1: Local version string SSH-2.0-OpenSSH_7.8
 debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6p1 Ubuntu-4ubuntu0.1
 debug1: match: OpenSSH_7.6p1 Ubuntu-4ubuntu0.1 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002
 debug1: Authenticating to myserver:22 as 'ubuntu'
 debug1: SSH2_MSG_KEXINIT sent
 debug1: SSH2_MSG_KEXINIT received
 debug1: kex: algorithm: curve25519-sha256
 debug1: kex: host key algorithm: ecdsa-sha2-nistp256
 debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
 debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
 debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
 debug1: Server host key: ecdsa-sha2-nistp256 SHA256:8/V/EyMKSlHjnDpF5v/ume45376635342324
 debug1: Host 'myserver' is known and matches the ECDSA host key.
 debug1: Found key in /Users/pablo/.ssh/known_hosts:62
 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_EXT_INFO received
 debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
 debug1: SSH2_MSG_SERVICE_ACCEPT received
 debug1: Authentications that can continue: publickey
 debug1: Next authentication method: publickey
 debug1: Trying private key: /Users/pablo/.ssh/myserver.pem
 debug1: Authentication succeeded (publickey).
 Authenticated to myserver ([xx.xx.xx.xx]:22).
 debug1: channel 0: new [client-session]
 debug1: Requesting [email protected]
 debug1: Entering interactive session.
 debug1: pledge: network
 debug1: client_input_global_request: rtype [email protected] want_reply 0
 debug1: Sending environment.
 debug1: Sending env LANG = es_ES.UTF-8
 packet_write_wait: Connection to 18.203.95.67 port 22: Broken pipe

答案1

经过一番研究,我发现将此配置添加到我的 ssh 配置文件中可以使其正常工作:

 Host *
     IPQoS lowdelay throughput

答案2

我遇到了和你一样的问题。
我设法通过添加以下选项来短期修复它。
-o ProxyCommand='nc %h %p'

相关内容