Using required hostkey in winscp.com versus VB.NET and dll
I'm looking to retrieve a file via SFTP from several remote systems (I've already connected to all the systems and the keys have been added to Putty's cache).
When using
This works correctly for any IP I use.
When I try this using VB.NET and the DLL it doesn't.
I get an error Error:
I have a lot of systems to connect to (and new ones will be added as well) and prefer not to hard code all the keys in my application. Is there a way to get this to work like
When using
winscp.com
I can use:
open sftp://username:password@10.22.49.14/ -hostkey="ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
When I try this using VB.NET and the DLL it doesn't.
.SshHostKeyFingerprint = "ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
The only way I have gotten this to work so far is to enter the specific keySystem.ArgumentException: SSH host key fingerprint does not match pattern
.SshHostKeyFingerprint = "ssh-rsa 2048 9e:f1:1e:93:91:37:ed:dd:ee:51:4e:c4:66:6f:bb:68"
winscp.com
so I can just use "xx:xx:xx..."
for all the systems I connect to?