Watch the video:
0:00 - Intro/Explanation
0:26 - Install OpenSSH Server
1:05 - Alternate OpenSSH Server install method
1:43 - Make sure OpenSSH Server starts with Windows
2:37 - Allow OpenSSH through Windows Firewall
3:45 - Test OpenSSH connection
5:05 - Securing OpenSSH with Public key authentication
8:29 - Deploy public key (on server)
9:43 - Using private key (on client)
10:46 - Disable password authentication
12:14 - Testing disabled password auth & Key auth
12:40 - Testing remote command line/Shell
Want to connect to your laptop or another device to your computer using SSH? Well, there’s an SSH server built-in to Windows; you need to activate it. This guide shows you how to set that up and key-based authentication for public/private key-based logins, which are much more secure!
OpenSSH Server: https://github.com/PowerShell/Win32-OpenSSH
Windows Firewall commands:
New-NetFirewallRule -Name sshd -DisplayName ‘OpenSSH SSH Server’ -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 -Program “C:\Windows\System32\OpenSSH\sshd.exe”
New-NetFirewallRule -Name sshd -DisplayName ‘OpenSSH SSH Server’ -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 -Program “C:\Program Files\OpenSSH\sshd.exe”
OpenSSH Key Management: https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_keymanagement