我试图通过ssh连接到本地计算机上运行在VMWare中的Ubuntu18.04VM。本地机器已经启动并运行了openssh服务器。
苹果默认的ssh二进制文件无法连接到VMWare中的VM,如文档中的这里。所以,我用自制软件安装了ssh,并尝试使用它。
在运行ssh时,它无法连接并输出错误:
kex_exchange_identification: write: Broken pipe使用详细标志运行显示如下:
$ /usr/local/bin/ssh -vvv dev@[ip]
OpenSSH_8.0p1, OpenSSL 1.1.1d 10 Sep 2019
debug1: Reading configuration data /Users/[username]/.ssh/config
debug1: /Users/[username]/.ssh/config line 1: Applying options for *
debug1: /Users/[username]/.ssh/config line 8: Applying options for *
debug1: /Users/[username]/.ssh/config line 11: Ignored unknown option "usekeychain"
debug1: Reading configuration data /usr/local/etc/ssh/ssh_config
debug2: resolve_canonicalize: hostname [ip] is address
debug2: ssh_connect_direct
debug1: Connecting to [ip] port 22.
debug1: Connection established.
debug1: getpeername failed: Invalid argument
debug1: identity file /Users/[username]/.ssh/id_rsa type 0
debug1: identity file /Users/[username]/.ssh/id_rsa-cert type -1
kex_exchange_identification: write: Broken pipe我的~/.ssh/config文件包含以下内容:
Host *
ServerAliveInterval 300
ServerAliveCountMax 2
TCPKeepAlive no
IPQoS=throughput
AddKeysToAgent yes
IgnoreUnknown UseKeychain
UseKeychain yes
IdentityFile ~/.ssh/id_rsa我尝试在VM上重新启动ssh服务器,但没有结果。我还没有在网上找到任何关于kex_exchange_identification错误的信息。
感谢所有的帮助!
发布于 2022-05-03 16:15:51
kex_exchange_identification: write: Broken pipe是SSH客户端在密钥交换(kex)期间断开连接的消息。
查看VMware来宾(S)上的日志,以了解SSH服务器挂起您的原因。如果它们是Unix/Linux,请在/var/log/中查找名称为messages、syslog、auth和/或authpriv的文件。
https://unix.stackexchange.com/questions/546394
复制相似问题