The server rejected SFTP connection, but it listens for FTP connections.

Advertisement

cellco
Joined:
Posts:
1

The server rejected SFTP connection, but it listens for FTP connections.

Im using built 7781. I started having this error since last winscp update.
I verified that my server uses port 22 for sftp.
I tried to connect using filezilla, which works fine

Here is the details of the problem:

It gives the following error
The server rejected SFTP connection, but it listens for FTP connections.

Did you want to use FTP protocol instead of SFTP? Prefer using encryption.
in two situations:

1. When trying to connect initially. It might give the error 20 times in a line and then allow to connect or it might connect immediately without any error.
2. When trying to transfer files. After clicking the OK button for 20-30 times files get transfered somehow

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,505
Location:
Prague, Czechia

Re: The server rejected SFTP connection, but it listens for FTP connections.

Please attach a full session log file showing the problem (using the latest version of WinSCP). As well as FileZilla verbose log file (not the message log from the GUI).

To generate the session log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

I started having this error since last winscp update.
If you downgrade, does the problem resolve?

Reply with quote

HansTroost
Joined:
Posts:
2
Location:
Netherlands

same problem: The server rejected SFTP connection, but it listens for FTP connections.

Dear support,

I'm using WinSCP 5.11.3 (Build 7995) on Windows 7

Use it to connect to UBUNUTU Server 16.04 with UFW enabled: works perfect!

Try to use it for another machine, running Linux Mint 18.2 (updated!)
This machine has:
- UFW: inactive (so no firewall)
- running lighttpd for playing around with PI-Hole (so that runs as well)
- OpenSSH running

SFTP connection refused, switching to FTP did not help: similar problem. See attached LOG
  • Hans Troost-WinSCP.log (5.95 KB, Private file)

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,505
Location:
Prague, Czechia

Re: same problem: The server rejected SFTP connection, but it listens for FTP connections.

HansTroost wrote:

Dear support,

I'm using WinSCP 5.11.3 (Build 7995) on Windows 7

Use it to connect to UBUNUTU Server 16.04 with UFW enabled: works perfect!

Try to use it for another machine, running Linux Mint 18.2 (updated!)
This machine has:
- UFW: inactive (so no firewall)
- running lighttpd for playing around with PI-Hole (so that runs as well)
- OpenSSH running

SFTP connection refused, switching to FTP did not help: similar problem. See attached LOG
Can you connect with any other SFTP or FTP client?

Reply with quote

Advertisement

HansTroost
Joined:
Posts:
2
Location:
Netherlands

Re: same problem: The server rejected SFTP connection, but it listens for FTP connections.

martin wrote:

Can you connect with any other SFTP or FTP client?

First of all: Happy 2018! And thanks for replying.

Followed your suggestion: with other tools: similar problems.
Possibly my OpenSSH-server-installation was not configured well or something else. Re-installed it and now everything works fine.

My apologies for asking before I tried everything else: I'm relatively new to all this stuff: have end-user experience with linux, but now since some weeks experimenting with setting up web-servers on linux, configuring firewalls etc.

Reply with quote

Erik_Nguyen
Guest

Re: same problem: The server rejected SFTP connection, but it listens for FTP connections.

HansTroost wrote:

martin wrote:

Can you connect with any other SFTP or FTP client?

First of all: Happy 2018! And thanks for replying.

Followed your suggestion: with other tools: similar problems.
Possibly my OpenSSH-server-installation was not configured well or something else. Re-installed it and now everything works fine.

My apologies for asking before I tried everything else: I'm relatively new to all this stuff: have end-user experience with linux, but now since some weeks experimenting with setting up web-servers on linux, configuring firewalls etc.
I have to login to give my thanks to you. You help me out a lot when I get lost. Thanks so much, bro.

Reply with quote

ashamide
Guest

Re: same problem: The server rejected SFTP connection, but it listens for FTP connections.

Please remember to do this on the ubuntu server

sudo apt install openssh-server

Reply with quote

Advertisement

You can post new topics in this forum