SSH into Windows
With Windows 10 and 11, you can ssh into your Windows machine, with ssh key too.
Install OpenSSH Server
Go to Windows Settings
OpenSSH Server, click
Enable OpenSSH Service
OpenSSH service not enable by default.
Open service manager
OpenSSH SSH Server
SSH sign-in to Windows 10/11, both local accounts and Microsoft accounts can be used.
To use Microsoft accounts(eg. Hotmail), you have to find out the shorten name of your account. It is your home directory name in
C:\Users\. Then you can login ssh with the shorten name using Microsoft account password.
To use ssh key with Windows, you do the same as Linux, almost.
For standard Windows user, you do the same as Linux. Put the public key inside
The first account of Windows is always an administrator account.
Unlike Linux, Windows administrators do not use home directory
authorized_keys. ALL administrators public keys are to be put in
One per line.
If a standard account is promoted to administrator account, its home directory
authorized_keys file will stop working, and its public key need to be put into the above file.
On the other hand, if an administrator account is demoted to standard, it will revert back to home directory setup like the previous section.