The server rejected SFTP connection, but it listens for FTP connections
Asked Answered
J

3

5

When I use WinSCP in Windows to connect to VMware with Ubuntu, it prompted this:

The server rejected SFTP connection, but it listens for FTP connections. Did you want to use FTP protocol instead of SFTP? Prefer using encryption.

What's the matter?
I can succeed to ping Ubuntu in Windows.

Januarius answered 7/1, 2014 at 6:39 Comment(0)
A
3

The fact that you can ping the server has nothing to do with what protocols it supports.

The message says that the server does not listen on port 22 (SSH, SFTP), but listens on port 21 (FTP). The point of the message is that WinSCP defaults to SFTP protocol, what is not common. So it tries to help users who expect FTP to be a default. But that's not relevant to you apparently.

As @ps2goat suggested, make sure you setup SSH/SFTP server.

For more details, see the documentation for the error message The server rejected SFTP connection, but it listens for FTP connections.

Arriviste answered 7/1, 2014 at 9:23 Comment(0)
F
4

If you see this error all of a sudden (when SFTP has always worked for you for this particular server), and if you are using CSF (ConfigServer Security & Firewall), then it might be that your IP was blocked for SSH access. Try flushing all blocks. Also, try restarting the SSH server.

Franz answered 6/9, 2017 at 9:27 Comment(0)
A
3

The fact that you can ping the server has nothing to do with what protocols it supports.

The message says that the server does not listen on port 22 (SSH, SFTP), but listens on port 21 (FTP). The point of the message is that WinSCP defaults to SFTP protocol, what is not common. So it tries to help users who expect FTP to be a default. But that's not relevant to you apparently.

As @ps2goat suggested, make sure you setup SSH/SFTP server.

For more details, see the documentation for the error message The server rejected SFTP connection, but it listens for FTP connections.

Arriviste answered 7/1, 2014 at 9:23 Comment(0)
F
1

Old question but still responding so others might get benefited.

I stumbled upon this error and the first thing I checked was if my ubuntu machine had ssh installed. It was there and the latest version and I still would get this error.

As long as you have ssh access to the target, check the ssh service status and most certainly it'd be found inactive. Turn it on using

sudo service ssh restart

and you should be back in the game.

Do check the status of the SFTP by using

sudo service ssh status 

and take any corrective action.

Federation answered 11/12, 2018 at 18:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.