当我想使用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/