PowerShell / PowerShell/Win32-OpenSSH

Subsystem for 5.1

Open
#1,938 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
8.3k
Forks
819
PR merge metrics
No merged PRs in 30d

Description

"OpenSSH for Windows" version
8.9.1.0

Server OperatingSystem
Windows Server 2016 Standard

Client OperatingSystem
Windows Server 2022 Standard

Is it possible to have a subsystem for Powershell 5.1?
I currently have this working:
Subsystem powershell c:/progra~1/powershell/7/pwsh.exe -sshs -NoLogo

I also have these set in registry:

PS C:\Windows\system32> Get-Item HKLM:\SOFTWARE\OpenSSH\


    Hive: HKEY_LOCAL_MACHINE\SOFTWARE


Name                           Property
----                           --------
OpenSSH                        DefaultShell              : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
                               DefaultShellCommandOption : /c


PS C:\Windows\system32>

When i ssh into the machine with ssh.exe i get Powershell 5.1. When i Invoke-Command from Powershell 7.2.3 on my client, i get into Powershell 7.2.3 on the server as well. Is it possible to enter Powershell 5.1 from 7.2.3?

I was thinking a subsystem for 5.1, but powershell.exe doesn't have the -sshs switch and this doesn't work:
Subsystem powershell5 c:/Windows/System32/WINDOW~1/v1.0/powershell.exe -NoLogo

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository files or tests are named. Start by locating the existing Subsystem handling and reviewing how Windows PowerShell 5.1 accepts command-line input compared with PowerShell 7's SSH mode. Done means establishing whether a supported PowerShell 5.1 subsystem is possible and defining the required implementation or documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.