SSH to Windows Using SSH Keys
Append your public key to the SSH server authorized_keys file
Windows SSH server side: c:\users\admin\.ssh\authorized_keys
Login Windows Using SSH Key Under Local Admin
OpenSSH uses special key-based access settings for the users with Windows local administrator privileges.
First of all, use a key file C:\ProgramData\ssh\administrators_authorized_keys instead of the authorized_keys file in the user profile. You must add your SSH key to this text file.
In order to use the authorized_keys file from a user profile and not to move the public key data to the administrators_authorized_keys file, you can comment the related line in the OpenSSH configuration file (C:\ProgramData\ssh\sshd_config).
Comment these lines:
#Match Group administrators
# AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys
restart-service sshd
Comments
Post a Comment