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

Author Message
Sachin
[View user's profile]

Joined: 2013-02-19
Posts: 9
Location: Mumbai
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.


Code:
 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.
WinSCP_19092013_16to17.log (9.37 KB) [Download]

Description: (none)

WinSCP_19092013_17to18.log (107.08 KB) [Download]

Description: WINSCP log for date 19-09-2013(IST)

Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
I suppose you use a wrong host key. What is a value of sVal_SSH_HostKey?
_________________
Martin Prikryl
Sachin
[View user's profile]

Joined: 2013-02-19
Posts: 9
Location: Mumbai
Hi Martin,
sVal_HostKey contain value of ssh host key fingerprint.I copied it from server information tab of Winscp UI
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
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.

_________________
Martin Prikryl
Sachin
[View user's profile]

Joined: 2013-02-19
Posts: 9
Location: Mumbai
Hi Martin,

Logs are attached in my first post.Anyway I used Beta version 5.2.4. I used
Code:
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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
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.

Quote:
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.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License