Skip to content

Unable to execute adminstrative commands from non-interactive session #2338

@roalter

Description

@roalter

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've experiencing problems since later version for OpenSSH for Windows. I'm using the OpenSSH server service to access a large amount of Virtual Windows machines. For easier use cases, the machines are operated via SSH (to have the same procedure on both Windows and Linux).

Since upgrading from 9.5 to 9.8 this is no longer possible.

Traced it down on the machine by only replacing the OpenSSH server on a wokring machine from 9.5 to 9.8, the errors ocurres. Is not related on Windows, Powershell or Pwsh version.

Expected behavior

# ssh adminuser@remotehost -i private.key get-computerinfo

WindowsBuildLabEx                                       : 19041.1.amd64fre.vb_release.191206-1406
WindowsCurrentVersion                                   : 6.3
WindowsEditionId                                        : Enterprise
WindowsInstallationType                                 : Client
WindowsInstallDateFromRegistry                          : 01.11.2024 19:55:51
WindowsSystemRoot                                       : C:\Windows
WindowsVersion                                          : 2009
BiosCharacteristics                                     : {4, 7, 9, 11...}
BiosBIOSVersion                                         : {INTEL  - 6040000, VMware, Inc. - 10000}
....
#

Actual behavior

# ssh adminuser@remotehost -i private.key get-computerinfo

get-computerinfo : Win32 internal error "Access is denied" 0x5 occurred while reading the console output buffer.
Contact Microsoft Customer Support Services.
At line:1 char:1
+ get-computerinfo
+ ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ReadError: (:) [Get-ComputerInfo], HostException
    + FullyQualifiedErrorId : ReadConsoleOutput,Microsoft.PowerShell.Commands.GetComputerInfoCommand

Error details

Environment data

Not possible due to a bash shell. Just executing ssh.

Caller:
# ssh -V
OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2

Version

OpenSSH 9.5 locally, OpenSSH 9.8 on remote

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions