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

Advertisement

WWagers
Joined:
Posts:
2
Location:
Central TN

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

I wrote an IDE application. It's been running perfectly for over two years.
A customer's SFTP site just started kicking back with the error in the subject.
I assumed they had changed something on their end, so I connected to their site with the WinSCP GUI.
I confirmed the changes, connected successfully, then viewed the Session Settings.
I updated the settings for their FTP site in my EDI Settings page.
I re-ran the EDI Report and got the same failure.
I asked them to check their settings and confirm them with me.
They sent back the updated settings, which matched what I got from the WinSCP GUI.
After speaking with their tech guy, I tested in Visual Studio's IDE and connected with no problem.
I assumed I had updated the application and forgot to push it to the server, so I went ahead and rebuilt it and pushed it to the server.
No change.

The IDE application successfully connects to two other SFTP sites.

I am at a complete and total loss. Does anyone have any suggestions?

From the server, I get this (full, redacted log attached):
< 2022-01-19 14:49:39.822 Script: Searching for host...
. 2022-01-19 14:49:39.822 Looking up host "ftp.**customer site**.com" for SSH connection
. 2022-01-19 14:49:39.838 Connecting to **customer IP** port 22
< 2022-01-19 14:49:39.853 Script: Connecting to host...
. 2022-01-19 14:49:39.853 We claim version: SSH-2.0-WinSCP_release_5.19.5
. 2022-01-19 14:49:39.885 Remote side unexpectedly closed network connection
. 2022-01-19 14:49:39.885 Knocking FTP port.
. 2022-01-19 14:49:39.916 FTP port opened, will suggest using FTP protocol.
< 2022-01-19 14:49:39.916 Script: Server unexpectedly closed network connection.
< 2022-01-19 14:49:39.916 The server rejected SFTP connection, but it listens for FTP connections.
< 2022-01-19 14:49:39.916 Did you want to use FTP protocol instead of SFTP? Prefer using encryption.
From my IDE, I get this (full, redacted log attached):
< 2022-01-19 14:49:38.797 Script: Searching for host...
. 2022-01-19 14:49:38.799 Looking up host "ftp.**customer site**.com" for SSH connection
. 2022-01-19 14:49:39.041 Connecting to **customer IP** port 22
< 2022-01-19 14:49:39.079 Script: Connecting to host...
. 2022-01-19 14:49:39.080 We claim version: SSH-2.0-WinSCP_release_5.19.5
. 2022-01-19 14:49:39.107 Remote version: SSH-2.0-CerberusFTPServer_12.0
. 2022-01-19 14:49:39.107 Using SSH protocol version 2
...then it successfully transfers the file.

Reply with quote

Advertisement

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

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

Most likely a firewall problem or a local network policy.

Reply with quote

WWagers

It turned out to be an issue on the remote end. Their firewall service automatically blocked the IP of our server that sent the file to their FTP server.

...stupid automated blacklist generator. ::sigh::

Reply with quote

Yingjie
Guest

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

Indeed, it works after allowing the WinSCP through the wall.
Many thanks.

Reply with quote

Advertisement

You can post new topics in this forum