Closed ku4eto closed 1 month ago
Tested as well from pure Ubuntu 22.04 and from OracleLinux 9.3. Both fail as well. On OL 9 at least there is a bit more of a information:
Received message too long 1416128883
Ensure the remote shell produces no output for non-interactive sessions.
OL9 version openssh-clients.x86_64 8.7p1-38.0.2.el9_4.4 @ol9_baseos_latest
This is by design from OpenSSH upstream. This issue is not specific to Win32-OpenSSH.
@maertendMSFT That may be so, but the behavior differs from the Linux experience.
scp
in Linux is by default using a non-interactive login shell.
But it seems like opening an scp
towards Win32-OpenSSH server with PowerShell as default shell, opens up an INTERACTIVE login shell. Since scp
expects no output returned, if you have ANY output from your PowerShell profile, it will fail (which is not the same for Linux systems, as output from the remote host is not present, due to the correct shell session type).
The question here is - is Win32-OpenSSH supposed to manage what kind of shell session is opened?
If yes - sounds like Win32-OpenSSH issue to me.
If this is not an OpenSSH-Win32 issue, then its a PowerShell issue and as such please confirm it, so i can open a issue in that repository.
Prerequisites
Steps to reproduce
DefaultShell
to PowerShell 7.4.5C:\Program Files\PowerShell\7\profile.ps1
with the following content:New-Alias -Name "history" -Value history_func -PassThru -Force -Option AllScope -Scope Global
Actual behavior
Error details