Hasty Briefsbeta

Bilingual

Using PowerShell over SSH, Twenty Years Later

6 hours ago
  • #PowerShell
  • #SSH
  • #Windows Server
  • Microsoft now includes OpenSSH client in Windows 10 and Server 2019+, with SSH server preinstalled in Windows Server 2025.
  • To use PowerShell as default shell over SSH, set registry value to PowerShell 7's pwsh.exe and configure sshd subsystem with short names or symlinks.
  • Key authentication differs for admin accounts: keys must go to administrators_authorized_keys with strict ACLs, causing common setup issues.
  • PowerShell 7 supports remoting over SSH with object pipelines, working across Windows, Linux, and macOS via commands like Enter-PSSession.
  • Limitations include lack of WinRM features (e.g., JEA), no profile loading, second-hop problems, and no dynamic key fetching from AD/Entra ID.
  • The evolution from 2006 Cygwin kludge to 2026 integrated SSH shows Microsoft's adoption of OpenSSH, enabling cross-platform, secure remote management.