Windows 10 ssh disable password authentication?

Solution 1:

In Windows 10 v1803 (aka 17134.191) it has changed.

Edit c:\ProgramData\ssh\sshd_config (aka %PROGRAMDATA%\ssh\sshd_config)

Solution 2:

You note that you have the service "SSH Server Proxy" - this service is not part the "OpenSSH Server (Beta)" optional feature in Windows 10 Fall Creators Update (v1709). It is part of Windows Developer mode - I wonder if this (possibly in combination with WSL) is leading to you connecting to a different OpenSSH server unintentionally, and why it appears the config is not being respected.

Try stopping or disabling the "SSH Server Proxy" service and see if the behavior changes, or alternatively, adjust the port # in your Windows\System32\OpenSSH\sshd_config to a non-standard port and test again.

I just deployed a lab Windows 10 v1709 VM to test this, and can confirm that by uncommenting the "# PasswordAuthentication yes" line (and switching the value to "no") that with only an sshd service restart, it blocks password-based logins.

The only services "OpenSSH Server (beta)" gives me are "sshd" and "ssh-agent". Fresh VM, without Windows Developer Mode or WSL / Bash on Ubuntu enabled.