When logging in via SSH, it automatically elevates privileges to the Administrator account #20616

Closed
opened 2026-01-31 07:19:07 +00:00 by claunia · 1 comment
Owner

Originally created by @brucmao on GitHub (Oct 3, 2023).

Windows Terminal version

1.18.1462.0

Windows build number

Win32NT 10.0.22621.0 Microsoft Windows NT 10.0.22621.0

Other Software

Both the local and remote computers are running Windows 11, and they are using the same version of Windows Terminal Preview. The PowerShell and OpenSSH versions are also the same.

OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3
powershell 7.3.7
theme https://starship.rs

Steps to reproduce

  1. Both the local and remote computers are logged in using the same Microsoft account.
  2. When I connect to the remote computer using OpenSSH, it will be elevated to the Administrator privilege.
  3. I use the following command to check if I have elevated privileges:
([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)

Expected Behavior

openssh

Actual Behavior

The command should not be elevated.

Originally created by @brucmao on GitHub (Oct 3, 2023). ### Windows Terminal version 1.18.1462.0 ### Windows build number Win32NT 10.0.22621.0 Microsoft Windows NT 10.0.22621.0 ### Other Software Both the local and remote computers are running Windows 11, and they are using the same version of Windows Terminal Preview. The PowerShell and OpenSSH versions are also the same. ``` OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3 powershell 7.3.7 theme https://starship.rs ``` ### Steps to reproduce 1. Both the local and remote computers are logged in using the same Microsoft account. 2. When I connect to the remote computer using OpenSSH, it will be elevated to the Administrator privilege. 3. I use the following command to check if I have elevated privileges: ``` ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) ``` ### Expected Behavior ![openssh](https://github.com/microsoft/terminal/assets/6119652/d9ab3540-6fa3-4ab2-bd99-a369f89a3761) ### Actual Behavior The command should not be elevated.
claunia added the Needs-TriageIssue-BugResolution-External labels 2026-01-31 07:19:07 +00:00
Author
Owner

@lhecker commented on GitHub (Oct 3, 2023):

Unfortunately we cannot do anything about this, as this is an issue with OpenSSH. It has been reported here and subsequently been closed as "by design": https://github.com/PowerShell/Win32-OpenSSH/issues/1652

I suspect this might change once #146 is resolved.

@lhecker commented on GitHub (Oct 3, 2023): Unfortunately we cannot do anything about this, as this is an issue with OpenSSH. It has been reported here and subsequently been closed as "by design": https://github.com/PowerShell/Win32-OpenSSH/issues/1652 I suspect this might change once #146 is resolved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20616