ssh_exchange_identification:读取:连接超时

ssh_exchange_identification:读取:连接超时

我从 Windows 机器使用 ssh 连接到 Raspberry PI 并收到以下消息:

PS C:\Users\user> ssh [email protected] -vvv
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
debug1: Reading configuration data C:\\Users\\user/.ssh/config
debug1: Reading configuration data __PROGRAMDATA__\\ssh/ssh_config
debug2: resolve_canonicalize: hostname 172.16.20.100 is address
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 172.16.20.100 [172.16.20.100] port 22.
debug1: Connection established.
debug1: identity file C:\\Users\\user/.ssh/id_rsa type 0
debug3: Failed to open file:C:/Users/user/.ssh/id_rsa-cert error:2
debug3: Failed to open file:C:/Users/user/.ssh/id_rsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\user/.ssh/id_rsa-cert type -1
debug3: Failed to open file:C:/Users/user/.ssh/id_dsa error:2
debug3: Failed to open file:C:/Users/user/.ssh/id_dsa.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\user/.ssh/id_dsa type -1
debug3: Failed to open file:C:/Users/user/.ssh/id_dsa-cert error:2
debug3: Failed to open file:C:/Users/user/.ssh/id_dsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\user/.ssh/id_dsa-cert type -1
debug3: Failed to open file:C:/Users/user/.ssh/id_ecdsa error:2
debug3: Failed to open file:C:/Users/user/.ssh/id_ecdsa.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\user/.ssh/id_ecdsa type -1
debug3: Failed to open file:C:/Users/user/.ssh/id_ecdsa-cert error:2
debug3: Failed to open file:C:/Users/user/.ssh/id_ecdsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\user/.ssh/id_ecdsa-cert type -1
debug3: Failed to open file:C:/Users/user/.ssh/id_ed25519 error:2
debug3: Failed to open file:C:/Users/user/.ssh/id_ed25519.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\user/.ssh/id_ed25519 type -1
debug3: Failed to open file:C:/Users/user/.ssh/id_ed25519-cert error:2
debug3: Failed to open file:C:/Users/user/.ssh/id_ed25519-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\user/.ssh/id_ed25519-cert type -1
debug3: Failed to open file:C:/Users/user/.ssh/id_xmss error:2
debug3: Failed to open file:C:/Users/user/.ssh/id_xmss.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\user/.ssh/id_xmss type -1
debug3: Failed to open file:C:/Users/user/.ssh/id_xmss-cert error:2
debug3: Failed to open file:C:/Users/user/.ssh/id_xmss-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\user/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.7
debug3: recv - from CB(2) ERROR:138, io:000001A90E8E96E0
ssh_exchange_identification: read: Connection timed out

在树莓派(服务器端)上我输入:

 sudo /usr/sbin/sshd -d
debug1: sshd version OpenSSH_7.9, OpenSSL 1.1.1d  10 Sep 2019
debug1: private host key #0: ssh-rsa SHA256:aXZ4Le7wCYPTbrCbVJ0rFrIlTcXKAllLJ9BgFgtwDEA
debug1: private host key #1: ecdsa-sha2-nistp256 SHA256:LCjd0igPxbcFfN+9wK7m2C4SykVPK7scQxrUnwYJyDQ
debug1: private host key #2: ssh-ed25519 SHA256:C+fhR3x/Vj7W4VY5ZeQhFoSJkhGWAkdgK2baFJ0IJcM
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
debug1: Set /proc/self/oom_score_adj from 0 to -1000
debug1: Bind to port 22 on 0.0.0.0.
Bind to port 22 on 0.0.0.0 failed: Address already in use.
debug1: Bind to port 22 on ::.
Bind to port 22 on :: failed: Address already in use.
Cannot bind any address.

我如何连接?

答案1

尝试更改您的 IP 地址,甚至将网络电缆插入不同的端口。我通过这种方式解决了这个问题。

相关内容