Host key wasn't verified! issue in .NET assembly code
Hi All,
I am in a big trouble.As part of up gradation I used Winscp 5.1.7[.NET assembly].Below is the code which I used for
SFTP.
This code worked fine in my developmental environment.In my dev environment both servers are windows server (i.e. SFTP server and Client M/c both are windows m/c).It was working properly in my dev environment.
When I moved in my new environment my application got stuck.In production I have SFTP server is Linux m/c while client m/c is W2K3 server.Every time it is giving me same exception i.e. Host key wasn't verified!.What should I do.I am completely stuck.I was the guy who proposed to upgrade to WinScp 5.1.7.Now everybody is asking me for wrong POC.Please help me.I have attached log file of WinSCP if anybody knows the solution please...please let me know.
I am in a big trouble.As part of up gradation I used Winscp 5.1.7[.NET assembly].Below is the code which I used for
SFTP.
With sessionOptions .Protocol = Protocol.Sftp .HostName = sVal_NCB_IpAddress '"172.17.XXX.XX" .UserName = sVal_Username '"ftpuser" .Password = sVal_Password '"XXX@XXX" .SshHostKeyFingerprint = sVal_SSH_HostKey '"RSA:XXXX End With Using session As Session = New Session ' Connect session.SessionLogPath = sSessionLogPath session.Open(sessionOptions)
This code worked fine in my developmental environment.In my dev environment both servers are windows server (i.e. SFTP server and Client M/c both are windows m/c).It was working properly in my dev environment.
When I moved in my new environment my application got stuck.In production I have SFTP server is Linux m/c while client m/c is W2K3 server.Every time it is giving me same exception i.e. Host key wasn't verified!.What should I do.I am completely stuck.I was the guy who proposed to upgrade to WinScp 5.1.7.Now everybody is asking me for wrong POC.Please help me.I have attached log file of WinSCP if anybody knows the solution please...please let me know.