linux - 无法 ssh 我的 ubuntu 服务器。 "kex_exchange_identification: banner line contains invalid characters"

标签 linux ubuntu ssh sshd

当我想使用VScode远程SSH到我的服务器时,提示如下错误:

...... kex_exchange_identification:标题行包含无效字符...... ......

一开始,我以为是我的 VSCode 错误,但我在 PowerShell 中尝试了最简单的 SSH 命令,它仍然发生。

这是一些日志:

(base) PS C:\Users\37097> ssh wsco@114.213.208.99 -p 1260 -v                                           OpenSSH_8.2p1, OpenSSL 1.1.1f  31 Mar 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 114.213.208.99 [114.213.208.99] port 1260.
debug1: Connection established.
debug1: identity file /c/Users/37097/.ssh/id_rsa type -1
debug1: identity file /c/Users/37097/.ssh/id_rsa-cert type -1
debug1: identity file /c/Users/37097/.ssh/id_dsa type -1
debug1: identity file /c/Users/37097/.ssh/id_dsa-cert type -1
debug1: identity file /c/Users/37097/.ssh/id_ecdsa type -1
debug1: identity file /c/Users/37097/.ssh/id_ecdsa-cert type -1
debug1: identity file /c/Users/37097/.ssh/id_ecdsa_sk type -1
debug1: identity file /c/Users/37097/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /c/Users/37097/.ssh/id_ed25519 type -1
debug1: identity file /c/Users/37097/.ssh/id_ed25519-cert type -1
debug1: identity file /c/Users/37097/.ssh/id_ed25519_sk type -1
debug1: identity file /c/Users/37097/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /c/Users/37097/.ssh/id_xmss type -1
debug1: identity file /c/Users/37097/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.2
kex_exchange_identification: banner line contains invalid characters

我什至在另一台 ubuntu 机器上试过,但有同样的问题。

我试着用谷歌搜索了几天,但没有一个能解决我的问题。

最佳答案

我看到这个没有回复,希望你能同时修复它。

对于其他正在搜索的人

kex_exchange_identification: banner line contains invalid characters

请注意,当错误地连接到网络服务器 (https) 而不是 sshd 时,ssh 会报告此错误。

检查 sshd 是否正在监听您正在连接的主机/端口,例如使用 netstat -anp

关于linux - 无法 ssh 我的 ubuntu 服务器。 "kex_exchange_identification: banner line contains invalid characters",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66685456/

相关文章:

javascript - 我应该如何自动启动node.js脚本

ssh - 使用命令行选项禁用SSHAgent

c - 在c中使用互斥锁进行多线程并一次运行一个线程

python - Vim 没有正确缩进 Python——Flask 应用程序、Trisquel Mini GNU/Linux、lxterminal

linux - Windows 程序内存与 Linux 程序内存

linux - shell脚本不运行

angular - 子目录中的 Laravel

amazon-web-services - gitlab CI:加载 key 错误:格式无效

java - 使用 java 和票证在 kerberos 上执行命令

c - 无法终止 fork 进程