PowerShell / PowerShell/Win32-OpenSSH

Win32-OpenSSH doesn't recognize WinRM Virtual Users

Open
#2,419 2 comments 0 reactions 1 assignee View on GitHub

@tgauth is already working on this.

Since Jan 12, 2026.

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

Description

Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.
Steps to reproduce

I want to run ssh-keygen inside a PowerShell JEA session running under a virtual account to manage SSH certificates. Unfortunately many of the ssh commands want to convert a UID to username even when it would not strictly be required - ssh-keygen being one of them. This fails when running under a virtual account.

Expected behavior
PS> ssh-keygen.exe -s C:\\ca -I "<user>" -n root C:\\user.pub
Signed user key user-cert.pub: id "<user>" serial 0 for root valid forever
Actual behavior
# JEA session configuration:
PS> Get-Content myjea.pssc
...
RunAsVirtualAccount = $true
...

# inside JEA session:
PS> whoami.exe
winrm virtual users\winrm va_11_<domain>_<user>

# run a custom JEA command:
PS> New-SSHCertificate ...
# which would run behind the scenes:
# ssh-keygen.exe -s C:\\ca -I "<user>" -n root C:\\user.pub
# result:
No user exists for uid 1
Error details

Environment data
PS> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.5.4
PSEdition                      Core
GitCommitId                    7.5.4
OS                             Microsoft Windows 10.0.20348
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Version

7.5.4

Visuals

No response

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.