Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Session Open is slow

I wouldn't call 1-2 second connection to a remote SSH/SFTP to be slow. Do you have a reason to believe it should be faster?

If you want us to investigate further, please attach a full session log file.

To generate the session log file, set Session.SessionLogPath. 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.
danfee

Session Open is slow

m_sessionOptions = new SessionOptions
{
    Protocol = Protocol.Sftp,
    HostName = sftpServerIP,
    UserName = sftpUserID,
    Password = sftpPassword,
    PortNumber = 2222,//默认2222端口
    GiveUpSecurityAndAcceptAnySshHostKey = true               
};
 
using (Session session = new Session())
{               
    session.SessionLogPath = @"D:\test\upload\log.txt";
    session.Open(m_sessionOptions);               
}

It takes 1~2 second to open session,can it be faster?