Thank you Martin, it worked.
- raviteja4545
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
System.ArgumentException
HResult=0x80070057
Message=SSH host key fingerprint "ssh-rsa ***********" does not match pattern /((ssh-rsa|ssh-dss|ssh-ed25519|ecdsa-sha2-nistp(256|384|521))( |-))?(\d+ )?([0-9a-f]{2}(:|-)){15}[0-9a-f]{2}(;((ssh-rsa|ssh-dss|ssh-ed25519|ecdsa-sha2-nistp(256|384|521))( |-))?(\d+ )?([0-9a-f]{2}(:|-)){15}[0-9a-f]{2})*/
Source=WinSCPnet
StackTrace:
at WinSCP.SessionOptions.SetSshHostKeyFingerprint(String s)
at AB.Barra.FTP.Program.Main(String[] args) in
// Set up session options
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Sftp,
HostName = "sftp.***.com",
UserName = "********",
Password = "********",
SshHostKeyFingerprint = "ssh-rsa 2048 ****/*******************",
};
sessionOptions.AddRawSettings("ProxyMethod", "3");
sessionOptions.AddRawSettings("ProxyHost", "********");
sessionOptions.AddRawSettings("ProxyPort", "8082");
using (Session session = new Session())
{
// Connect
session.Open(sessionOptions);
// Your code
}