Error: | Unable to connect to server via SFTP-SSH

Trying to connect to the router first FileZilla and second WinSCP and in both cases I get the same error. And I'm trying to connect to an old router with OpenWRT 15 or to a new router with OpenWrt 19.07.1
log from filezilla:

Stav: Připojování k
Odpověď: fzSftp started, protocol_version=9
Příkaz: open "root@" 22
Příkaz: Pass: ***************
Stav: Connected to
Chyba: FATAL ERROR: Received unexpected end-of-file from SFTP server
Chyba: Nelze se připojit k serveru

error message from winscp:
the server sent the exit status of command 127

Ahoj Mirku!
SFTP won't work unless you have installed the SFTP package openssh-sftp-server

This is strange because when I installed the old router, I backed up its configuration using winscp and I definitely didn't install the openssh-sftp-server package, as there was no space left to install

SCP and SFTP are different.
You can SCP the router with default installation. However Filezilla doesn't support SCP.
You'll need some specific SCP client, like WinSCP.

I changed in WinSCP from sftp:// to scp:// and it works. Thank you!

1 Like

If your problem is solved, feel free to mark the relevant post as the solution; and edit the title to add "[SOLVED]" to the beginning (click the pencil behind the topic).


1 Like

Just try from your cmd - ping ip_of_remote_host:22

if you able to ping then it's ok, otherwise your ssh connection port is closed

or change WinSCP from sftp:// to scp:// and it works

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.