NAT*_*I0N 7 linux osx ssh ubuntu
我正在尝试通过 ssh 连接到在本地机器上的 VMWare 中运行的 Ubuntu 18.04 VM。本地机器已启动并运行 openssh 服务器。
Apple 的默认 ssh 二进制文件无法连接到 VMWare 中的 VM,如此处所述。所以,我用自制软件安装了 ssh 并尝试使用它。
在运行 ssh 时,它无法连接并吐出错误:
kex_exchange_identification: write: Broken pipe
Run Code Online (Sandbox Code Playgroud)
使用详细标志运行显示以下内容:
$ /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
Run Code Online (Sandbox Code Playgroud)
我的~/.ssh/config文件包含以下内容:
Host *
ServerAliveInterval 300
ServerAliveCountMax 2
TCPKeepAlive no
IPQoS=throughput
AddKeysToAgent yes
IgnoreUnknown UseKeychain
UseKeychain yes
IdentityFile ~/.ssh/id_rsa
Run Code Online (Sandbox Code Playgroud)
我试过重新启动虚拟机上的 ssh 服务器无济于事。我一直无法在线找到有关 kex_exchange_identification 错误的任何信息。
感谢您的任何帮助!
小智 1
kex_exchange_identification: write: Broken pipe是来自 SSH 客户端的消息,表明 SSH 服务器 (sshd) 在密钥交换 (kex) 期间断开连接。
检查 VMware 来宾上的日志,了解 SSH 服务器挂起的原因。如果它们是 Unix/Linux VM,请在、、、 和/或 等/var/log/名称的文件中查找。messagessyslogauthauthpriv