Automatic fallback to SCP when SFTP isn't supported

Advertisement

shodan
Joined:
Posts:
5
Location:
Montreal

Automatic fallback to SCP when SFTP isn't supported

Hi,

I just discovered I could use WinSCP without installing an SFTP server on my space constrained OpenWRT device.

It took me a really long time to figure this out

2026-10-21_12h56s07_WinSCP_Error_689x384.png

I always assumed I needed to install openssh-sftp-server

But all I needed to do was change the protocol to SCP.

2026-10-21_12h59s23_WinSCP_Login_587x301.png

I think it would be a nice bit of polish, instead of erroring out, to not error out and work instead by auto trying SCP when SFTP fails. I imagine there's a way to query the server for capability, since that error occurs after the login has completed already.

2026-10-21_12h56s07_WinSCP_Error_689x384.png

2026-10-21_12h59s23_WinSCP_Login_587x301.png

Reply with quote

Advertisement

martin◆
Site Admin
martin avatar
Joined:
Posts:
43,111
Location:
Prague, Czechia

Re: Automatic fallback to SCP when SFTP isn't supported

WinSCP does fallback to SCP, when SFTP is not available.
See the "Allow SCP fallback" option (enabled by default).
https://winscp.net/eng/docs/ui_login_sftp
If it does not work with your server, please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

shodan
Joined:
Posts:
5
Location:
Montreal

Hello,

I was on 6.5.5, but I updated to 6.7

[img] 2026-10-22_06h56s00_1410x688.png[/img]

attempt connection in default SFTP mode

[img]2026-10-22_06h57s18_689x1191.png[/img]

Failed with error 127 "Cannot initialize SFTP protocol. Is the host running an SFTP server?"

I can't seem to find "Allow SCP fallback" in the menus

[img]2026-10-22_07h02s23_930x1670.png[/img]

I will add the log in the next post

2026-10-22_07h02s23_930x1670.png

2026-10-22_06h57s18_689x1191.png

2026-10-22_06h56s00_1410x688.png

Reply with quote

Advertisement

You can post new topics in this forum