Found out how to track session details:
Did it help you to resolve the problem?
Found out how to track session details:
using (Session session = new Session())
{
session.SessionLogPath = "Your full file Path here";
session.Open(sessionOptions);
}
SessionOptions sessionOptions = new SessionOptions();
sessionOptions.Protocol = Protocol.Sftp;
sessionOptions.HostName = "sftp.stuff.com";
sessionOptions.UserName = "username";
sessionOptions.Password = "password";
sessionOptions.GiveUpSecurityAndAcceptAnySshHostKey = true;
using (Session session = new Session())
{
session.Open(sessionOptions);
TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = TransferMode.Binary;
transferOptions.PreserveTimestamp = false;
TransferOperationResult transferResult;
transferResult = session.PutFiles("C:\localfile.txt", "sftp.stuff.com/remotepath/remotefile.txt", false, transferOptions);
transferResult.Check();
}