Re: Error trying to use private key
I do not think, this has anything to do with any private key (after all, your code does not even show any use of any private key).
I'm pretty sure that your value of
I'm pretty sure that your value of
SshHostKeyFingerprint
is wrong or incompatible with the version of WinSCP you are using. Show us the value, if you need our help.