首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >SSH在"kex_exchange_identification“上失败

SSH在"kex_exchange_identification“上失败
EN

Unix & Linux用户
提问于 2019-10-11 20:12:11
回答 1查看 6K关注 0票数 8

我试图通过ssh连接到本地计算机上运行在VMWare中的Ubuntu18.04VM。本地机器已经启动并运行了openssh服务器。

苹果默认的ssh二进制文件无法连接到VMWare中的VM,如文档中的这里。所以,我用自制软件安装了ssh,并尝试使用它。

在运行ssh时,它无法连接并输出错误:

代码语言:javascript
复制
kex_exchange_identification: write: Broken pipe

使用详细标志运行显示如下:

代码语言:javascript
复制
$ /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文件包含以下内容:

代码语言:javascript
复制
Host *
    ServerAliveInterval 300
    ServerAliveCountMax 2
    TCPKeepAlive no
    IPQoS=throughput
    AddKeysToAgent yes
    IgnoreUnknown UseKeychain
    UseKeychain yes
    IdentityFile ~/.ssh/id_rsa

我尝试在VM上重新启动ssh服务器,但没有结果。我还没有在网上找到任何关于kex_exchange_identification错误的信息。

感谢所有的帮助!

EN

回答 1

Unix & Linux用户

发布于 2022-05-03 16:15:51

kex_exchange_identification: write: Broken pipe是SSH客户端在密钥交换(kex)期间断开连接的消息。

查看VMware来宾(S)上的日志,以了解SSH服务器挂起您的原因。如果它们是Unix/Linux,请在/var/log/中查找名称为messagessyslogauth和/或authpriv的文件。

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/546394

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档