Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: SessionOptions.GiveUpSecurityAndAcceptAnyTlsHostCertificate = true has no effect

No, it's GiveUpSecurityAndAcceptAnySshHostKey:
https://winscp.net/eng/docs/library_sessionoptions

Make sure you understand what you are doing when using the property!
vargonian

SessionOptions.GiveUpSecurityAndAcceptAnyTlsHostCertificate = true has no effect

Even when I set this option, I still get the exception when using the .NET library:

ArgumentException: SessionOptions.Protocol is Protocol.Sftp or Protocol.Scp, but SessionOptions.HostKey is not set.

I am using SCP with an SSH private key file path specified, if that's relevant. As far as I understand it, setting SessionOptions.GiveUpSecurityAndAcceptAnyTlsHostCertificate should obviate the need to specify a host key, as stated in the documentation and forums.