Could not connect through SFTP. Connection refused by server.

  • 145 Views
  • Last Post 14 September 2021
  • Topic Is Solved
zmfltm posted this 12 September 2021

OS Name/Version: Ubuntu 20.04.3 LTS

Product Name/Version: AMP v2.2.0.6

Problem Description: Could not connect to server through SFTP.

Steps to reproduce: I tried to connect to SFTP with Filezilla using the credentials given on the 'Connect via SFTP' button on the File Manager, but I keep getting the following:

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

Actions taken to resolve so far: Tried connecting with the Terminal. And tried using ports 2223 and 2224.

Order By: Standard | Newest | Votes
Mike posted this 12 September 2021

Can you run ampinstmgr ports ads01 as the AMP user and post the output please?

zmfltm posted this 12 September 2021

Can you run ampinstmgr ports ads01 as the AMP user and post the output please?

[Info] AMP Instance Manager v2.2.0.6 built 23/08/2021 13:36
[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV
[Info] Port usage for ADS01 (ADS01)
[Info] Instance is currently running.
[Info] LISTENING 8080 TCP (Core.Webserver.Port)
[Info] LISTENING 2223 TCP (FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] LISTENING 12820 UDP (ADSModule.Network.MetricsServerPort)

Mike posted this 13 September 2021

And if you use ampinstmgr dumpfirewall amp as root - does port 2223 show up?

zmfltm posted this 13 September 2021

And if you use ampinstmgr dumpfirewall amp as root - does port 2223 show up?

I get this:

[Info] AMP Instance Manager v2.2.0.6 built 23/08/2021 13:36
[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV
[Info] Using UFW firewall.
[Info] No firewall rules to display.

Mike posted this 13 September 2021

Is UFW actually enabled? Check ufw status. If not it needs enabling for AMP to sync the firewall.

Make sure you add a UFW rule for rule 22 to allow SSH before turning UFW on.

zmfltm posted this 13 September 2021

Is UFW actually enabled? Check ufw status. If not it needs enabling for AMP to sync the firewall.

Make sure you add a UFW rule for rule 22 to allow SSH before turning UFW on.

I did exactly as you said. UFW was disabled. Before enabling it I added rule 22 and then turned it on.
I'm still getting the same errors.

Mike posted this 14 September 2021

Run ampinstmgr updatefirewall amp as root. Then run ampinstmgr dumpfirewall amp to check the rules were added.

Close