SFTP over SSH via .NET

Advertisement

paradaxon
Joined:
Posts:
1
Location:
Ukraine

SFTP over SSH via .NET

Hi there! Got bug in actual version (5.13.2 8455). While using code generated by WinSCP t be used with .NET C# - exception occures: in <SshHostKeyFingerprint = "ssh-ed25519 256..." >. WinSCP generates code using SHA-256 string, but .NET code wants it to be MD5 string instead.
So, if you do have exception, which says that <SshHostKeyFingerprint> does not match regular expression - simply change string with daata from MD5 string or just give up with fingerprint with <SessionOptions.GiveUpSecurityAndAcceptAnySshHostKey>.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,587
Location:
Prague, Czechia

Re: SFTP over SSH via .NET

paradaxon wrote:

WinSCP generates code using SHA-256 string, but .NET code wants it to be MD5 string instead.
Only if you use old version of .NET assembly. Use the latest version.

Reply with quote

Guest

Re: SFTP over SSH via .NET

martin wrote:

paradaxon wrote:

WinSCP generates code using SHA-256 string, but .NET code wants it to be MD5 string instead.
Only if you use old version of .NET assembly. Use the latest version.
I do not know about old version. I installed it as NuGet package with latest version 5.13.2 (build version is nowhere to see).

Reply with quote

martin
Site Admin
martin avatar

Re: SFTP over SSH via .NET

OK, so would you show us exact code that was generated to set the SshHostKeyFingerprint? (it's a public key, nothing secret).

Reply with quote

Advertisement

You can post new topics in this forum