Last active
April 17, 2019 01:42
-
-
Save kyokuheki/c8386739145b7c5eca88c368fd95aa19 to your computer and use it in GitHub Desktop.
SSHD on Windows 10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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