You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is failing
sshd default shell is cmd.exe, and executes command with cmd.exe /c [command]
the problem is the command is not surrounded with "".
if ssh client executes cmd.exe /c cd C:\ && mkdir test
Expected output
rem cmd.exe /c "cd C:\ && mkdir test"
a dir C:\test
Actual output
rem cmd.exe /c cd C:\ && mkdir test
a dir C:\Users\testuser\test
source code
contrib/win32/win32compat/shell-host.c line 1272
command is not surrounded with "".
/*
* Launch via cmd.exe /c, otherwise known issues exist with color rendering in powershell
*/
cmd[0] = L'\0';
GOTO_CLEANUP_ON_ERR(wcscat_s(cmd, MAX_CMD_LEN, system32_path));
GOTO_CLEANUP_ON_ERR(wcscat_s(cmd, MAX_CMD_LEN, L"\\cmd.exe /c "));
GOTO_CLEANUP_ON_ERR(wcscat_s(cmd, MAX_CMD_LEN, command));
SetConsoleCtrlHandler(NULL, FALSE);
GOTO_CLEANUP_ON_FALSE(CreateProcess(NULL, cmd, NULL, NULL, TRUE, CREATE_NEW_CONSOLE,
NULL, NULL, &si, &pi));
The text was updated successfully, but these errors were encountered:
Please answer the following
If it is a terminal issue then please go through wiki
https://github.com/PowerShell/Win32-OpenSSH/wiki/TTY-PTY-support-in-Windows-OpenSSH
"OpenSSH for Windows" version
7.7.1.0
Server OperatingSystem
Windows 10 Pro
Client OperatingSystem
Windows 10 Pro
What is failing
sshd default shell is cmd.exe, and executes command with cmd.exe /c [command]
the problem is the command is not surrounded with "".
if ssh client executes cmd.exe /c cd C:\ && mkdir test
Expected output
rem cmd.exe /c "cd C:\ && mkdir test"
a dir C:\test
Actual output
rem cmd.exe /c cd C:\ && mkdir test
a dir C:\Users\testuser\test
source code
contrib/win32/win32compat/shell-host.c line 1272
command is not surrounded with "".
The text was updated successfully, but these errors were encountered: