Skip to content

Instantly share code, notes, and snippets.

@edcote edcote/win10_openssh.md
Last active Jan 19, 2018

Embed
What would you like to do?
Windows 10 OpenSSH Configuration

Win10 OpenSSH Tips

Don't ask. I dislike Windows.

  • Recursively take ownership administrator group

    TAKEOWN /F "C:\WINDOWS\System32\OpenSSH" /R TAKEOWN /F "C:\WINDOWS\System32\OpenSSH" /A /R

  • Reset permissions, then grant full to users

    ICACLS "C:\WINDOWS\System32\OpenSSH" /T /Q /C /RESET ICACLS "C:\WINDOWS\System32\OpenSSH" /grant:r "users:(F)" /C /T

  • Service configuration

    Enable services

    Set-Service sshd -StartupType Automatic Set-Service ssh-agent -StartupType Automatic

    Start services

    Start-Service sshd Start-Service ssh-agent

    Get status of serives

    Get-Service sshd Get-Service ssh-agent

  • Securing keys

    Install-Module -Force OpenSSHUtils Repair-SshdHostKeyPermission -FilePath C:\Windows\System32\OpenSSH\ssh_host_ed25519_key

  • Helpful debug steps

It is helpful to manually run sshd with debug output enabled.

Stop-Service sshd
sshd -d
  • Open firewall port

    netsh advfirewall firewall add rule name="Tunnel TCP Port 2022" dir=in action=allow protocol=TCP localport=2022 netsh advfirewall firewall add rule name="Tunnel TCP Port 2022" dir=out action=allow protocol=TCP localport=2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.