Taking about 30 seconds to establish an SFTP Connection

Advertisement

JCornelison
Joined:
Posts:
3

Taking about 30 seconds to establish an SFTP Connection

Hello,

I am using the WinSCP.net library version 6.1.2. It seems to take about 30 seconds for the .Open() to create a connection. Then when I try to grab a file, it takes about 20 seconds.

When I look at the DebugLogPath file, it looks like there is a lot of looping going on. Any suggestions on what may be causing the issue?
SessionOptions sessionOptions = new SessionOptions
{
    Protocol = Protocol.Sftp,
    HostName = _host,
    UserName = _user,
    PortNumber = _port,
    SshHostKeyFingerprint = _fingerPrint,
    SshPrivateKeyPath = _localKeyPath,
    TimeoutInMilliseconds = _timeOut
};

Reply with quote

Advertisement

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

Re: Taking about 30 seconds to establish an SFTP Connection

Is the connection faster in GUI? If it is, post session (not debug) logs both from GUI and your code.
If the GUI connection is slow too, is it faster in any other SFTP client?

Reply with quote

JCornelison

The GUI is basically instant connection. I was using the Renci library and that also connects really fast. I was planning on swapping from Renci to WinSCP due to the flexibility it provides.

Reply with quote

Advertisement

You can post new topics in this forum