SFTP sync error

Get help for specific problems
Posts: 68
Joined: 13 Aug 2018

TheExpert

Hi all,

in the past I synced files between two Windows servers with FreeFileSync via SMB shares. This worked very good.

In the near future, the target server will be a Linux based NAS. So the sync with FreeFileSync will then be switched to SFTP.

Now, as preparation of this change and for testing the functionality I'm setting up the syncs between these Windows servers with SFTP. For this I installed OpenSSH 9.2.2.0p1 for Windows on the target system (Windows Server 2012 R2). Some syncs are running without issues. But a lot of syncs show this error: SSH_FX_NO_SUCH_FILE: Failed opening remote file [libssh2_sftp_opendir]

And when I do a manual comparison of the folders with SFTP there are a lot of files which are located on the left side to be synced to the right side. But doing the SMB based comparison with the same folders shows that there are no files to be synced.

I think this has to do with special characters and German umlauts in the file and folder names. And unfortunatelly there are long folder and file names, too.

Regarding the special characters I read that OpenSSH on Windows is configured to use UTF-8 and can't be changed but there shouldn't be issues with special characters and German umlauts. What about FreeFileSync? Is it using UTF-8 or ANSI?

Regarding long folder or file names I dont't know if there are limitations with SFTP that are lower than the limitations for Windows itself. Are there different limitations?

When accessing the shown paths with errors with WinSCP I get the same error. So there's an issue with long paths.

Thank You.
Posts: 68
Joined: 13 Aug 2018

TheExpert

It looks like OpenSSH is the source of the issues. With another SFTP server software on the Windows server there are no issues with long paths. I will see the next days if there are more or other issues regarding the switch to SFTP.
Posts: 943
Joined: 8 May 2006

therube

(Just to note, appears that OpenSSH v8.1.0.0p1-Beta [& later] have added LFN support.
Otherwise, there is a 256-char limit.)
Posts: 68
Joined: 13 Aug 2018

TheExpert

With OpenSSH there's a character limit because of using the Win32 API of Windows. Other SFTP server software doesn't use the Win32 API and so there's no issue with long paths.

LeoW

What would be a good open source alternative to open SSH on Windows?
To make windows into an SFTP server.
Posts: 68
Joined: 13 Aug 2018

TheExpert

What would be a good open source alternative to open SSH on Windows?
To make windows into an SFTP server. LeoW, 12 Sep 2023, 23:17
Good question. I'm also interested in free solutions. But I didn't find many options. If you want to use it in commercial environments the majority of the products I found are paid software. Even FileZilla because of the SFTP support.

For private usage there are a lot of free versions of commercial products
, i. e. Rebex Buru SFTP Server: https://www.rebex.net/buru-sftp-server/. I'm testing that solution with the free 30 days period and it looks good. All configuration is done with a easy to use web admin UI.

One more free solution is SFTPgo: https://github.com/drakkan/sftpgo/tree/main. I've installed it but I haven't finished the configuration yet which is in special cases not easy (AD authentication and port change isn't done by the web admin UI).

Are there other good open source SFTP server for Windows available?