Win32-OpenSSH icon indicating copy to clipboard operation
Win32-OpenSSH copied to clipboard

After logging in as a standard user on Windows 2012, there is no shell.

Open Tty725 opened this issue 4 months ago • 4 comments

Prerequisites

  • [x] Write a descriptive title.
  • [x] Make sure you are able to repro it on the latest version
  • [x] Search the existing issues.

Steps to reproduce

v9.8.3.0p2-Preview

sshd_config

PubkeyAuthentication yes
AuthorizedKeysFile	.ssh/authorized_keys
PasswordAuthentication no
Subsystem	sftp	sftp-server.exe

AllowGroups administrators bisync

Using ssh -vvv, refer to the image for information with and without shell.

bisync Image

administrators

Image

Expected behavior

shell

Actual behavior

no shell

Error details


Environment data

Name                           Value
----                           -----
PSVersion                      5.1.14409.2001
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14409.2001
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Version

v9.8.3.0p2-Preview

Visuals

No response

Tty725 avatar Sep 14 '25 07:09 Tty725

Hi @Tty725 thanks for the issue! Can you please share the logs from the server machine during log in? You can find steps in our troubleshooting guide, https://github.com/PowerShell/Win32-OpenSSH/wiki/Troubleshooting-Steps and other steps you can take to try and fix this. Thanks!

StevenBucher98 avatar Sep 15 '25 17:09 StevenBucher98

Hi @Tty725 thanks for the issue! Can you please share the logs from the server machine during log in? You can find steps in our troubleshooting guide, https://github.com/PowerShell/Win32-OpenSSH/wiki/Troubleshooting-Steps and other steps you can take to try and fix this. Thanks!

Hi @StevenBucher98 server sshd_conf

SyslogFacility LOCAL0
LogLevel DEBUG3

PubkeyAuthentication yes
AuthorizedKeysFile	.ssh/authorized_keys
PasswordAuthentication no
Subsystem	sftp	sftp-server.exe

AllowGroups administrators bisync

In the log file, the real IP and key content have been replaced, please understand.

sshd-session.admin.log sshd-session.bisync.log sshd.log

When renaming sshd-session.bisync.log, I first executed pskill sshd-session, which led to success.

C:\>pskill sshd-session
3 processes named sshd-session killed.

Looking forward to your good news, thank you.

Tty725 avatar Sep 16 '25 11:09 Tty725

Is it possible that sshd-session.bisync.log got truncated, e.g. by the writing process being killed before its log-file write buffer was flushed to the filesystem? It ends somewhat abruptly. Are there gentler ways of letting that process terminate?

mgkuhn avatar Sep 24 '25 12:09 mgkuhn

I did not truncate the log file itself. But I don't know if there is a gentle way, because the client can only be forcefully shut down, and even after being shut down, the server does not release.

Tty725 avatar Sep 24 '25 12:09 Tty725