Ошибка появляется в момент попытки установки PowerShell сессии over SSH:
$session = New-PSSession -HostName xxx.xxx.xx.x -UserName pdebug
[email protected]'s password:
New-PSSession: [xxx.xxx.xx.x] The background process reported an error with the following message: The SSH client session has ended with error message: subsystem request failed on channel 0.
Решение
Необходимо в %programdata%\ssh\sshd_config
добавить параметр:
Subsystem powershell pwsh.exe -sshs -NoLogo -NoProfile
Перезапустить сервис sshd:
Get-Service -Name sshd | Restart-Service
Еще
- Enable-PSRemoting (Microsoft.PowerShell.Core) - PowerShell | Microsoft Learn
- Get started with OpenSSH for Windows | Microsoft Learn
- PowerShell Remoting Over SSH - PowerShell | Microsoft Learn
- New-PSSession error "subsystem request failed on channel 0" when using SSH key authentication · Issue #5945 · PowerShell/PowerShell · GitHub