Topic "RSA host key usage for .NET assembly"

Author Message
irrupt
[View user's profile]

Joined: 2016-07-20
Posts: 4
Location: London, Ontario Canada
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
irrupt
[View user's profile]

Joined: 2016-07-20
Posts: 4
Location: London, Ontario Canada
really? no one has an answer to this? Confused
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
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
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