I used this guide to install OpenSSH from WinSCP's website.
I used the msi
installer that is listed on the github page https://github.com/PowerShell/Win32-OpenSSH/releases.
The server seems to be running but after trying to login I get:
---------------------------
Error
---------------------------
Connection has been unexpectedly closed. Server sent command exit status 1.
---------------------------
Cannot initialize SFTP protocol. Is the host running an SFTP server?
---------------------------
OK Reconnect Help
---------------------------
On the server machine there seems to be an sshd running and listening on port 22 (copied from TCPview) :
Process | PID | Protocol | State | Local Address | Local Port | Remote Address | Remote Port | Create Time | Module name |
---|---|---|---|---|---|---|---|---|---|
sshd.exe | 5844 | TCP | Listen | 0.0.0.0 | 22 | 0.0.0.0 | 0 | 8/19/2022 6:49:33 PM | sshd |
sshd.exe | 5844 | TCPv6 | Listen | :: | 22 | :: | 0 | 8/19/2022 6:49:33 PM | sshd |
I have not changed the default sshd_config
Update:
Using putty and the same user name and password works and I can browse directories.
Here's putty vs WinScp:
(Where red and orange are username and machine name respectively)