Skip to content

Instantly share code, notes, and snippets.

@k14i
Created February 8, 2017 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k14i/10eb31319f8494d60062bf648928459b to your computer and use it in GitHub Desktop.
Save k14i/10eb31319f8494d60062bf648928459b to your computer and use it in GitHub Desktop.
A script to run sshd of Bash on Windows quietly at the Windows starting up with a shortcut.
Set-ExecutionPolicy RemoteSigned -Scope Process
Set-Location C:\Windows\System32
Start-Process -FilePath bash -ArgumentList "-c `"sudo /usr/sbin/sshd -D`"" -WindowStyle hidden
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy RemoteSigned -File C:\Users\k14i\bin\bash_exe_-c_sudo_usr_sbin_sshd_-d.ps1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment