Skip to content

Instantly share code, notes, and snippets.

@kyokuheki
Last active April 17, 2019 01:42
Show Gist options
  • Save kyokuheki/c8386739145b7c5eca88c368fd95aa19 to your computer and use it in GitHub Desktop.
Save kyokuheki/c8386739145b7c5eca88c368fd95aa19 to your computer and use it in GitHub Desktop.
SSHD on Windows 10
New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH SSH Server' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
Start-Service sshd
cp $env:windir\System32\OpenSSH\sshd_config_default $env:windir\System32\OpenSSH\sshd_config
notepad $env:windir\System32\OpenSSH\sshd_config
#
Restart-Service sshd
Set-Service sshd -StartupType Automatic
notepad $env:USERPROFILE\.ssh\authorized_keys
get-content "D:\home\kyokuheki\.ssh\authorized_keys" | add-content $env:USERPROFILE\.ssh\authorized_keys
sudo su -
ssh-keygen -A
mkdir /run/sshd
#/usr/sbin/sshd -D
service ssh start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment