• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please be aware: Kaspersky Anti-Virus has been deprecated and is no longer available for installation on the current Plesk release (18.0.63).
    Starting from Plesk Obsidian 18.0.64, the extension will be automatically removed from the servers it is installed on. For details and recommended actions, see the Feature and Deprecation Plan and the deprecation FAQ.

Question Cant connect with SFTP user and login in Plesk ( amazon lightsail)

alexk345

Basic Pleskian
Server operating system version
ubunto 22
Plesk version and microupdate number
obsidian
hi

Ok i was able to connect to Amazon Lightsail via main ssh with VISUAL CODE. But its user is Ubuntu. I cant edit or create files with that user in ubuntu.
I need to use same user as plesk as it created the domain.

Now i try to connect to that directory via sftp and its connecting. Created separate ftp account its not connecting

I checked system log in logbrowser i see this
Connection closed by authenticating user USERNAME IPADDRESS port 50848 [preauth]

I thought it should be easy. I also chosen SSH - /bin/bash(chroot)

I am stuck. Even chatGpt dont know answer. Why make it difficult? its ubuntu os

Anyone have any solution?
 
Hello, @alexk345. Could you please confirm what's the FTP mode you are using? If it is 'active', please make sure to switch it to 'passive' and give it another try. Also, have you tried attempting the connection from different devices/network to exclude the possibility of being blocked by a local firewall?
 
The same problem...
Status: Connection established, waiting for welcome message...
Status: Initializing TLS...
Status: TLS connection established.
Status: Logged in
Status: Retrieving directory listing...
Can't see directories... :(
 
Does your FTP client return any specific error? Are you trying to connect via FTP or SFTP? Please check the following:

  1. If the passive ports are configured in ProFTPd
  2. If you attempting to establish an SFTP connection, please double-check if SSH access is enabled for the user in question
 
Does your FTP client return any specific error? Are you trying to connect via FTP or SFTP? Please check the following:

  1. If the passive ports are configured in ProFTPd
  2. If you attempting to establish an SFTP connection, please double-check if SSH access is enabled for the user in question


Status: Connection established, waiting for welcome message...
Status: Initializing TLS...
Status: TLS connection established.
Status: Logged in
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is the current directory
Command: TYPE I
Response: 200 Type set to I
Command: PASV
Response: 227 Entering Passive Mode ().
Command: MLSD
Error: Connection timed out after 20 seconds of inactivity
Error: Failed to retrieve directory listing


SSH access works. I can connect as root without any problem.
 
Does your FTP client return any specific error? Are you trying to connect via FTP or SFTP? Please check the following:

  1. If the passive ports are configured in ProFTPd
  2. If you attempting to establish an SFTP connection, please double-check if SSH access is enabled for the user in question
We created an "additional ftp user" and have been trying to connect using these credentials. How can we check this user has ssh access enabled.
The main account user can connect, but I do not want to pass these details on to the third party developer we have.
 
If you are trying to connect via FTP, you don't need SSH access enabled. That's only needed for SFTP, as it is SSH subsystem. Assuming that you are referring to plain FTP access, could you please confirm if you have the passive port range configured in ProFTPd and what's the exact error message you are encountering?
 
Hi,

PassivePorts 49152 65535 is what I get when I run the sed command in the link you sent earlier.

I have lightsail set up to allow ports 49152-65535

Finally, when I try and connect through filezilla (I try with port 49152), I get an error: "Connection attempt failed with "ECONNREFUSED - Connection refused by server"."

I have a feeling that although I have allowed the above ports, the firewall may be ignoring these?
Is there anyway to check from the server (I have ssh access) to verify if the port is open?
 
I am looking for plain ftp access as the user I have created as access to a very specific directory on the plesk server.
 
Sorted. For some reason, I did try port 21 yesterday and earlier today and it didn't work.
Have no idea why it is working now - I take that is a win.

Thank you for your fast replies.
 
Please try with the default port 21 and passive transfer mode.
Hi,

I have tried reconnecing to via ftp (filezilla set up hasn't changed, which was working yesterday).
However, today it doesn't connect.

I get:
Error: Connection timed out after 20 seconds of inactivity
Error: Failed to retrieve directory listing


Port 21 is still active in lightsail.
 
Status: Connection established, waiting for welcome message...
Status: Initializing TLS...
Status: TLS connection established.
Status: Logged in
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is the current directory
Command: TYPE I
Response: 200 Type set to I
Command: PASV
Response: 227 Entering Passive Mode ().
Command: MLSD
Error: Connection timed out after 20 seconds of inactivity
Error: Failed to retrieve directory listing


SSH access works. I can connect as root without any problem.
I get exactly the same issue as this.
 
Just tried using ftp via command prompt to connect to the target server.
I can log in. However when doing the ls command - I don't get any reply.
Then after a while it times out.

In auth.log in the target server, I get the following when the "ls" command is executed.
Failed to connect to system bus: No such file or directory
 
Yes, the issue is that restricting it stops it from working!
Waiting to hear what plesk has to say about ports as I just tried restricting the range to 49152-49200 and it stopped working
 
The range of ports (49152 - 65534) is too large. It is not correct to open so many ports in the firewall.
Port range 49152 to 65535 is defined by the Linux kernel as the default range for ephemeral ports (the IANA registered ephemeral port range).
 
Back
Top