Host key wasn't verified! issue in .NET assembly code

Advertisement

Sachin
Joined:
Posts:
9
Location:
Mumbai

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.


 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.
Description: WINSCP log for date 19-09-2013(IST)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,567
Location:
Prague, Czechia

Re: Host key wasn't verified! issue in .NET assembly code

I suppose you use a wrong host key. What is a value of sVal_SSH_HostKey?

Reply with quote

Sachin

Re: Host key wasn't verified! issue in .NET assembly code

Hi Martin,
sVal_HostKey contain value of ssh host key fingerprint.I copied it from server information tab of Winscp UI

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,567
Location:
Prague, Czechia

Re: Host key wasn't verified! issue in .NET assembly code

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate 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 may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.

Reply with quote

Sachin
Joined:
Posts:
9
Location:
Mumbai

Re: Host key wasn't verified! issue in .NET assembly code

Hi Martin,

Logs are attached in my first post.Anyway I used Beta version 5.2.4. I used
GiveUpSecurityAndAcceptAnySshHostKey = true
.

Can you please tell me what would be the tentative 'general availability'(Live Rel) release date of 5.2.X version of WinSCP.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,567
Location:
Prague, Czechia

Re: Host key wasn't verified! issue in .NET assembly code

Sachin wrote:

Logs are attached in my first post.
The logs are from 5.1.7, that does not record information, I need to help you. That's why I've asked for logs from the latest version of WinSCP.

Can you please tell me what would be the tentative 'general availability'(Live Rel) release date of 5.2.X version of WinSCP.
I never give any dates. Sorry.

Reply with quote

Advertisement

You can post new topics in this forum