I am trying to establish passwordless ssh connection from Ubuntu 20.04 to Win 10.
I installed new Win10 (downloaded from Microsoft site, no activated).
I downloaded openssh from git (OpenSSH_for_Windows_8.6p1, LibreSSL 3.3.3)
I created file for my win user user/.ssh/authorized_keys and copied (with scp) my public key from ubunutu machine to it. I checked that my key exists on remote machine.
sshd_settings:
PubkeyAuthentication yes
PasswordAuthentication yes
AuthorizedKeysFile - tried default .ssh/authorized_keys, %USERPROFILES\.ssh/authorized_keys%, with no this parameter.
Regular ssh connection with password works fine. Firewall was turned off.
I did same for establish ssh passwordless connection linux to linux - work fine.
I read a lot of articles: I have to create key, copy it to remote machine, reload sshd service and everything should work fine. For linux to linux it works as expected but linux to win10.
Should I have some extra settings?
Should I have extra permissions?
What did I do wrong? Could someone help me plz?
UPDATED:
I did it.
In MS docs said if user is admin you should place keys to another place %programdata%/ssh/administrators_authorized_keys
but for me it did not work. And I found row in the bottom of sshd_setting
about this requirements and just removed it. Now everything works fine and as expected.