Skip to content

Instantly share code, notes, and snippets.

@JeremyNevill
Last active December 14, 2017 17:19
Show Gist options
  • Select an option

  • Save JeremyNevill/a25763ff2dfe570c22d16e0e6e4df50f to your computer and use it in GitHub Desktop.

Select an option

Save JeremyNevill/a25763ff2dfe570c22d16e0e6e4df50f to your computer and use it in GitHub Desktop.
Windows_OpenSSH_Install
choco install openssh
cd "C:\Program Files\OpenSSH-Win64"
powershell -ExecutionPolicy Bypass -File install-sshd.ps1
.\ssh-keygen.exe -A
powershell -ExecutionPolicy Bypass '.\FixHostFilePermissions.ps1 -Confirm:$false'
Set-Service sshd -StartupType Automatic
Set-Service ssh-agent -StartupType Automatic
Start-Service ssh-agent
Start-Service sshd
@JeremyNevill
Copy link
Copy Markdown
Author

This badboy installs openssh on windows (works on 2012r2 and 2016 at least) and configures it to run as a service.

You can then ssh youruser@yourserver.ip to ssh onto the windows box.

Handy for creating things like ssh tunnels between machines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment