Topic "WinSCP.SessionRemoteException: The server rejected SFTP connection, but it listens for FTP connectio"

Author Message
[View user's profile]

Joined: 2015-11-20
Posts: 1
Location: Lexington, KY
WinSCP version
OS Version: Windows 7

I can able to connect using the WINSCP application but when I use the sample code its giving me the following error message

+ ex {WinSCP.SessionRemoteException: Network error: Connection to "" timed out. ---> WinSCP.SessionRemoteException: The server rejected SFTP connection, but it listens for FTP connections.

Did you want to use FTP protocol instead of SFTP? Prefer using encryption.
--- End of inner exception stack trace ---
at WinSCP.SessionLogReader.Read(LogReadFlags flags)
at WinSCP.ElementLogReader.Read(LogReadFlags flags)
at WinSCP.CustomLogReader.TryWaitForNonEmptyElement(String localName, LogReadFlags flags)
at WinSCP.CustomLogReader.WaitForNonEmptyElement(String localName, LogReadFlags flags)
at WinSCP.CustomLogReader.WaitForNonEmptyElementAndCreateLogReader(String localName, LogReadFlags flags)
at WinSCP.CustomLogReader.WaitForGroupAndCreateLogReader()
at WinSCP.Session.Open(SessionOptions sessionOptions)
at ACS.Aetna.Common.GenericClients.Ftp.FtpUtils.SftpLib.DownloadFiles(String downloadDirectory, String remoteDirectory, String remoteFileNameMask, Boolean deleteFileOnHost, List`1& log, List`1& downloadedFileList) in c:\Projects\ACS\Aetna\Common\GenericClients\Ftp\FtpUtils\SftpLib.cs:line 205} System.Exception {WinSCP.SessionRemoteException}
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27086
Location: Prague, Czechia
Please attach a session log file both from GUI and .NET assembly (Session.SessionLogPath).

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License