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

Raspberry Pi(サーバー側)で、次のように入力します。

 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アドレスを変更するか、ネットワークケーブルを別のポートに接続してみてください。私はこの方法で問題を解決しました。

関連情報