SSH from Windows 10 to Raspberry Pi immediately fails, no password prompt

  raspberry-pi, ssh, windows

I have a Raspberry Pi Zero with Rasbian installed. I can SSH just fine from my Macbook using pub/priv keys, however I can’t get it to work on my Windows 10 desktop using OpenSSH or PuTTY.

In Windows PowerShell –

PS C:>ssh [email protected]<Pi IP>
ssh: connect to host <Pi IP> port 22: Permission denied

I get only this error message immediately, no password prompt or (reason). Every other question/post I have found through google, the person gets a password prompt or some reason in parenthesis but I’ve tried those solutions anyway.

What I have tried:

  • Using keys with both OpenSSH and PuTTY by manually copying the public key to the Pi (both as a .pub and pasting into authorized_users)
  • Changing sshd_config to PasswordAuthentication no and ChallengeResponseAuthentication no
  • Connecting the Pi directly to the router w/ ethernet cable (instead of using Wifi)

I get the same error in PuTTY, FileZilla, Windows PowerShell, and Windows Command Prompt. Never asked for a password, just immediate failure. I can SSH just fine from MacOS Terminal so I know the Pi’s SSH works.

Source: Windows Questions