RSA host key usage for .NET assembly

Advertisement

irrupt
Joined:
Posts:
4
Location:
London, Ontario Canada

RSA host key usage for .NET assembly

Is it possible to use the cached RSA key while using the .NET assemblies instead of using the WinSCP.sessionoptions parameters?

I have the RSA key already cached and using the scripting methods work, but when I tried to use the .NET assemblies in Powershell, it doesn't seem to read the WinSCP.ini file.

I can't have the key hard coded in my script or an xml file.

I can't use this option - SshHostKeyFingerprint = "ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"

Is there a WinSCP.sessionoptions parameter that defines the location of the WinSCP.ini so it reads the cached key?

thanks

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: RSA host key usage for .NET assembly

irrupt wrote:

Is it possible to use the cached RSA key while using the .NET assemblies instead of using the WinSCP.sessionoptions parameters?
No. See https://winscp.net/eng/docs/library_from_script#default_config

[quote]I can't have the key hard coded in my script or an xml file.[/qoute]
Why? How's loading a host key fingerprint from a registry better than an XML file? And if you prefer the registry, load it from the registry.

See also https://winscp.net/eng/docs/library_example_known_hosts

Reply with quote

Advertisement

You can post new topics in this forum