Topic "Host Key wasn't verified!"

Author Message
SikhSuperman
[View user's profile]

Joined: 2014-03-19
Posts: 6
Hello - I believe I got everything working, but the issue is that I get the above error with 'Authentication Failed' in my .NET assembly. When I first got the ssh host key fingerprint, I didn't check the box to "cache the key and always trust this host". So, i assume that the host didn't get added to my host's file??

Basically, what do I need to do to verify the key again either through scripting or GUI? By the way, when I use 'open <ip address of sftp> -host key ssh rsa xx:xx:xx, etc, I get a 'Host does not exist' and winscp attempts to connect in 4s. I am using 5.x of winscp.

Any help is appreciated.

SS
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
SikhSuperman wrote:
Hello - I believe I got everything working, but the issue is that I get the above error with 'Authentication Failed' in my .NET assembly. When I first got the ssh host key fingerprint, I didn't check the box to "cache the key and always trust this host". So, i assume that the host didn't get added to my host's file??

This is irrelevant (unless you set Session.DefaultConfiguration = false, what is not recommended).
What value do you set to SessionOptions.SshHostKeyFingerprint?

Quote:
Basically, what do I need to do to verify the key again either through scripting or GUI?

You do not. You need to set SessionOptions.SshHostKeyFingerprint correctly.

Quote:
By the way, when I use 'open <ip address of sftp> -host key ssh rsa xx:xx:xx, etc, I get a 'Host does not exist' and winscp attempts to connect in 4s. I am using 5.x of winscp.

It should be open <ip address of sftp> -hostkey="ssh-rsa 1024 xx:xx:xx"
_________________
Martin Prikryl
SikhSuperman
[View user's profile]

Joined: 2014-03-19
Posts: 6
Thanks Martin - It turned out that my ssh key had an incorrect number in it. Embarassed But, I ran into this error:

Code:

WinSCP.SessionLocalException: WinSCP process terminated with exit code 3 and output "", without responding (response log file C:\Users\TEMP\AppData\Local\Temp\wscp0AC0.02181261.tmp was not created). This could indicate lack of write permissions to the log folder or problems starting WinSCP itself.
   at WinSCP.Session.Open(SessionOptions sessionOptions)
   at <project>.AppCode.SyncBL.SendFTPFile(String filename, String fileNamePath)


From what I have reading on winscp.com I needed to upgrade. So, I went ahead and upgraded my assembly to 5.5.2 from 5.1.7. Is this all that needs to be done?

Thanks!
SS
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Did the upgrade help or not?

Are you referring to this bug?
https://winscp.net/tracker/show_bug.cgi?id=996
If should not apply to you, as you probably did not run WinSCP too many times yet.
_________________
Martin Prikryl
SikhSuperman
[View user's profile]

Joined: 2014-03-19
Posts: 6
Martin - it looks like this error was resolved when I upgraded. It's hard for me to test, as I don't have physical access to the environment. I rely on log files to troubleshoot.

But, I did end up received the following error:
Code:
Could not load file or assembly 'WinSCP, Version=1.0.7.3446, Culture=neutral, PublicKeyToken=b5f19f5762436b89' or one of its dependencies. The module was expected to contain an assembly manifest.


Again, from my reading, it looks like that I am targeting a 64bit when the WinSCP dll is 32bit. I've made the change in my application ('AnyCPU' to 32bit) and will follow up if I was successful.

Thanks again for the help here!!
SS
SikhSuperman
[View user's profile]

Joined: 2014-03-19
Posts: 6
Just to provide an update in case somebody else runs into issues. I have to say that the 'manifest' error really just went away after doing a clean solution/rebuild project. I believe the winscp assembly is compiled against 'Any Cpu' so, changing between 32bit/64bit should be irrelevant. But, I'm sure Martin will chime in and correct me if I'm wrong.

So, I am compiling my project against 'Any Cpu' and so far the initial test seemed to work.

Thanks!
SS
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