SFTP connection to external server doesn't work

Hello,

I currently trying to run scheduled backups from my virtualmin to an external FTP.

When creating the backup to the FTP server I got following error: Failed to connect to FTP server : initial connection failed : 2.0-OpenSSH_7.4

When using Filezilla or SSH to access the external FTP it works without a problem.

I enter the ftp details in scheduled backups like this:

MY_IP:22
USERNAME
PASSWORD

SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.5
Webmin version 2.202

Pretty sure secure should be Port 2222

also is the remote server capable of receiving this connection i.e.

  • new enough (encryption algorithm negotiation)
  • ports open

That isn’t an FTP server. That’s ssh. So, use the ssh option.

If you want FTP, connect to an FTP server (which is not port 22 and is not using FTP over SSH protocol). There’s FTP over TLS which is FTP, but there is literally never a reason to use FTP in a world with ssh/scp.

Filezilla is not just an FTP client. It also support ssh. But, an FTP client (that only supports FTP) cannot talk to an ssh server, and the FTP client Virtualmin uses is not also an ssh client.

That’s also ssh. ProFTPd is also an ssh server (well, just FTP over ssh, it doesn’t allow a login shell), and we configure it on port 2222 for convenience for people who want FTP over SSH and limited access for users (safer/simpler than chroot, and no shell possible).

FTP is port 20 or 21, plus optional high ports for active FTP. But, just use ssh.

Just use the right protocol in Virtualmin’s destination configuration for the server you’re talking to.