sftp is not working, and ftp is not working!!!

Posted August 10, 2017 25.8k views

When connecting with sftp:
server ip: *******
username: root
password: rootpassword
port: 22
It says
The server rejected SFTP connection, but it listens for FTP connections.

Did you want to use FTP protocol instead of SFTP? Prefer using encryption.

When i try to connect with ftp, it wont, how the hell i can connect with ftp?
This is plain stupid

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
8 answers

Got it, somebody have changed the port to 2500
Now is another problem at least i can see logs and so.
Mysql isnt respondig, or starting up.
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ’/var/run/mysqld/mysqld.sock’ (2)

Read some where that it could be the case of full disc on the droplet and after restart the mysql server did not startup for some reason.

Where can i find the cache catalog or tmp that i can delete for freeing up some space?

The WinSCP website contains a great explanation of what causes this error here:

The majority of the reasons for the error are that your server must have a running, non-firewalled SSH server and you must use the correct login details i.e. port, username, and password.

i got my sftp server working, but still cant login.

username root and just reset my root password but still nothing.

Have you installed a dedicated sftp server or are you using an ssh server?

Have you checked the log file on the server? It will usually indicate what is the reason that the connection was refused. For SSH this will be in either:


If you are using a dedicated sftp server would you be able to tell me which one you installed?

I think im useing SSH, havent installed anything.
I only have access to the droplet via web and to console.

Nothing else, but i need access to ftp.

Are you able to SSH into the server?

Did you make any changes to SSH such as disabling password authentication or changing the port?

Hey, yes, im able to SSH into console, and everything.
How can i see witch ports are open?
sudo netstat -plutn | grep 22?

Hello, uukmari

You can also examine the /var/log/messages in addition to that /var/log/secure/ log in order to check if there is a logged error.

You can also temporary open the sshd on custom port in order to debug the connection with this command:

/usr/sbin/sshd -p $different_port -ddd

Note: Change $different_port with an actual port, e.g 7895

You need to execute the command from the server and then you can ssh or connect via SFTP client and check the logged information on the ssh client you used to execute the command.

Hope that this helps!