- Open Admin PowerShell
- Run the following command
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0- Enable the services
Set-Service -Name ssh-agent -StartupType `Automatic`
Set-Service -Name sshd -StartupType `Automatic`- Start both services
Start-Service ssh-agent
Start-Service sshd- Public keys go here
C:\ProgramData\ssh\administrators_authorized_keys - Remove
AuthenticatedUserspermission from aforementioned fileC:\ProgramData\ssh\administrators_authorized_keys
- Open
C:\ProgramData\ssh\sshd_config - Change the line that says
#PubkeyAuthenticationto remove the Pound Sign (Hash Tag for you youngins) - Change the line that says
#PasswordAuthenticationyes to PasswordAuthentication no (And remove the Pound Sign) - Save the file
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -ForceRestart both services to avoid a reboot of the computer
Restart-Service ssh-agent
Restart-Service sshd