Digital Marketing

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


Don’t forget to restart the sshd service after saving changes in sshd_config.

restart-service sshd

Comments

Popular posts from this blog

MySQL Sandbox with the Sakila sample database