-
Notifications
You must be signed in to change notification settings - Fork 802
Closed
PowerShell/openssh-portable
#622Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest version
- Search the existing issues.
Steps to reproduce
Install a New Windows server 2022, download the latest release https://github.com/PowerShell/Win32-OpenSSH/releases/tag/v8.9.1.0p1-Beta and extract to %PROGRAMFILES% folder, by example, c:\Program Files\OpenSSH-Win64
Open a powershell prompt with admins privileges and run c:\Program Files\OpenSSH-Win64\Install.ps1
Start OpenSSH Windows Services.
Try a SFTP connection to server from any computer on the network using WinSCP or similar
you get the error: "Cannot initialize SFTP protocol. Is the host running an SFTP server?"
Expected behavior
You should be able to connect to FTP using SFTPActual behavior
If you add the path of OpenSSH (c:\Program Files\OpenSSH-Win64\) to System Environment PATH variable and restart the OpenSSH service the connection is successful
This behavior is only on the latest version, the previous version didn't need the installation folder on the path variable.
Why is needed now? and if really is needed why is not added by the install-sshd.ps1 script?
doesn't have sense you need the variable since SSHD.exe knows where from was executed.Error details
No response
Environment data
PS C:\Windows\system32> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.20348.859
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.859
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1Version
v8.9.1.0p1-Beta
Visuals
No response