Filezilla FTP/SFTP Connection Error: 'Could not connect to server

Operating system Ubuntu Linux 22.04.2
Webmin version 2.021
Virtualmin version 7.7
Package updates [All installed packages are up to date]

So what port are you using?

for the ftp i m using the default port which is 22

What connection error? I’ve just checked Filezilla and it is working for me.

the error that i am encountering says “Error: Could not connect to server”

So in FileZilla Connection settings you have the defaults and have entered the IP of your server (which you can ping ok) and the user + correct password.

BTW this should have nothing to do with Virtualmin (unless you have closed port 22 somewhere)

the port 22 is enable in my case and yes, i have checked, im using the right IP, port number, username and password

do you have any other firewall? unless fail2ban has triggered

Does that user have FTP access in Virtualmin? (Sorry if these questions seem daft)

when i installed the virtualmin the firewalld was active by default, i disabled it and installed the UFW and enabled the port 22 through it, so right now i have just one firewall enabled.

So only root user has access not the Virtualmin users

1 Like

yes thats right

Sounds like UFW might be the cause, as default is firewallD and it all works fine. And would that stop fail2ban working?

root is OK for testing but bad security policy (I’m sure the team at Virtualmin would not recommend disabling fail2ban)
I’m going to have to think a little more about this…(again I don’t think this has anything to do with Virtualmin)

as hostinger is not helping me out and you guys are great at solving technical issues thats why i thought that i should ask from you

If you use Filezilla Quick connect do you get something like this?

If you are then add sftp:// before the IP/host and it should work.
If not go through the Edit -> Network configuration Wizard it will probably be using your client IP. (back to - if you can’t find your IP on the net → no one can)

yes im getting the exact same error

Quick connect is really fussy - there too many other settings that Filezilla needs so use the “Site Manager”

im going through the Site Manager way and it automatically adds the sftp:// before the IP/Host but still returns the error

OK I have just set up a new box. Using Filezilla Site Manager

I then get the usual
Screenshot 2023-07-16 142734
which of course I accept - if not it fails to connect (unsurprisingly)

BTW this is a new box with OS = Ubuntu 22.04 (No Virtualmin no UFW)