Pcornel
Windows · Remote Access

OpenSSH Server

Cheat sheet · https://pcornel.dk/topic.php?topic=3123

Back to the Topic

Answer

OpenSSH Server is an optional Windows feature (Add-WindowsCapability -Name OpenSSH.Server) providing sshd for secure remote shells and file transfer. Configure it in C:\ProgramData\ssh\sshd_config.

Remember

  • OpenSSH Server is an optional Windows capability.
  • Its configuration is in C:\ProgramData\ssh\sshd_config.
  • Administrators' keys go in administrators_authorized_keys.

First checks

  • Test-NetConnection <host> -Port 3389 — RDP port
  • Get-ItemProperty 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -Name fDenyTSConnections — RDP enabled (0)
  • Test-WSMan <host> — WinRM
  • Get-Service sshd — OpenSSH server

Verify in this order

sshd service → port 22 → key/password auth → shell (cmd/PowerShell)

Where it usually breaks

First mismatch in host/interface identity → local config/routing/name state → Windows service/provider → firewall/security/session → remote service → application-visible exchange; preserve identity/native error/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3123

Confirmation

Confirm action

Continue?