Post a reply

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

registereduser

It worked! Thank you very much!
martin

Re: GiveUpSecurityAndAcceptAnySshHostKey is it really working?

Yes, SessionOptions.GiveUpSecurityAndAcceptAnySshHostKey is working. Though it's indeed obsolete. You should use SessionOptions.SshHostKeyPolicy = SshHostKeyPolicy.GiveUpSecurityAndAcceptAny.
https://winscp.net/eng/docs/library_sessionoptions#sshhostkeypolicy
If it does not work for you, we need your code and session log file.
registereduser

GiveUpSecurityAndAcceptAnySshHostKey is it really working?

I'm not sure if I'm in the right section of forum.

We C# application where code below works fine if SshHostKeyFingerprint information provided.
SessionOptions sessionOptions = new SessionOptions
   {  Protocol = Protocol.Sftp,
      HostName = "ftp.N.com"
      UserName = "N",
      Password = "@#$%"
      SshHostKeyFingerprint="ssh-rsa 2048 ....."
     };

But to provide info for for SshHostKeyFingerprint I manfully (it changes daily) open WinSCP copy ssh info from it then paste it to our application. Is their a way to automatically accept new one? I look in to what you have on site but looks like some of thing obsoleted now. I tried to replace SshHostKeyFingerprint="" with GiveUpSecurityAndAcceptAnySshHostKey = true and GiveUpSecurityAndAcceptAnyTlsHostCertificate = true. It did not work. Is it supposed to work the way I need it? Can someone point me to clear C# code which works?