Created
September 18, 2019 00:02
-
-
Save trodemaster/79cf2f2ef96c7c1043fb37ccaeb21457 to your computer and use it in GitHub Desktop.
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
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco install -y openssh -params '"/SSHServerFeature"' -force | |
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force | |
New-Item -ItemType "directory" -Path "c:\Users\Administrator\.ssh" -ErrorAction 0 | |
Set-Content -Path c:\Users\Administrator\.ssh\authorized_keys -Value 'ssh-ed25519 AAAAC3NzaC1lUSEYOUROWNKEN+WQwgLuE0g4aK' | |
& "C:\Program Files\OpenSSH-Win64\FixHostFilePermissions.ps1" | |
& "C:\Program Files\OpenSSH-Win64\FixUserFilePermissions.ps1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment