Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion

Solved - Connection attempt failed with "ECONNREFUSED - Connection refused by server
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Solved - Connection attempt failed with "ECONNREFUSED - Connection refused by server

myhkenmyhken Member
edited January 2017 in General

I have had some issues with FTP on some of my servers lately, I can't connect to my FTP servers at all, just get this:

Status: Connecting to 91.xxx.xxx.xxx:21... Status: Connection attempt failed with "ECONNREFUSED - Connection refused by server". Error: Could not connect to server

The servers that have this issue, is running CentOS 6.8 with Virtualmin CP and using ProFTP.
The strange thing is that it's working fine on VPS from Vultr, DO etc, but not on dedicated servers and VMs inside my own servers.

ProFTP is running fine in Virtualmin, no errors.

I'm using ConfigServer Security & Firewall version 9.28 on all servers.

Where do I start to look? And why is the same setup working fine on VPS but not on dedicated servers and/or VMs?

I have temporally solved this using SSH to connect, but I want to solve the FTP issue.

Any experts out there?

Comments

  • I should have done it before, but I did now compare the proftpd.conf file on my VPS servers and my dedicated servers/VMs, and found this added to the last ones (that did not work):

    LoadModule mod_sftp.c <IfModule mod_sftp.c> SFTPEngine on Port 2222 SFTPLog /var/log/proftpd/sftp.log SFTPHostKey /etc/ssh/ssh_host_rsa_key SFTPHostKey /etc/ssh/ssh_host_dsa_key SFTPAuthorizedUserKeys file:~/.sftp/authorized_keys SFTPCompression delayed </IfModule>

    When I removed it and restarted ProFTP, it finally worked.

Sign In or Register to comment.