1

I connecting into a Raspberry PI using ssh from my windows machine and getting the following message :

PS C:\Users\user> ssh pi@172.16.20.100 -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

On the raspberry pi (server side) I type:

 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.

how do i get connected?

6
  • The question should be about Linux on RPi not about Windows. So you should check the sshd logs on the RPi side (in /var/log/auth.log), to know what happened. If that's not enough, sshd might have to be also run in debug mode.
    – A.B
    May 25, 2021 at 13:54
  • added debug, I can't SSH in from the locally on the Raspberry PI. Its when I try to connect from another machine i get the message. Appreciate your advice May 25, 2021 at 14:12
  • the messages tell sshd is already running. You should check the logs of the running sshd first in /var/log/auth.log without trying to run it (which fails).
    – A.B
    May 25, 2021 at 14:15
  • 1
    Sorry correction in my previous comment. Local SSH works, any remote ssh's don't. There's no further messages appear in /var/log/auth.log when i try to connect from my Windows laptop. I've also turned "LogLevel VERBOSE" in /etc/ssh/sshd_config. May 25, 2021 at 14:25
  • ive also tried ssh from my android phone and still same problem so i dont think its windows related. May 25, 2021 at 14:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.