SshHostKeyFingerprint does not match

Advertisement

AxelG
Joined:
Posts:
3

SshHostKeyFingerprint does not match

Hello,

here is my problem.
I have created a session in . NET (Visual Studio 2015).
My "SshHostKeyFingerprint" has never been accepted.
The String contains:
mySessionOptions.SshHostKeyFingerprint
= "ssh-ed25519 256 xirJmD/0DgUenJZ7msgH+jEsE+1J/QbYK7rQu0ZpFV8="

The answer is:
"Host key does not match configured key ""ssh-ed25519 256 xirJmD/0DgUenJZ7msgH+jEsE+1J/QbYK7rQu0ZpFV8=""!"
"Host key fingerprint is ssh-ed25519 256 xirJmD/0dgUenJZ7msgH+jEsE+1J/QbYK7rQu0ZpFV8=."
"Authentication failed."

What is wrong?
I have copied the string exactly- from the logfile of a gui-session.
Thanks a lot for helpful advises!

Reply with quote

Advertisement

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

Re: SshHostKeyFingerprint does not match

AxelG wrote:

The String contains:
mySessionOptions.SshHostKeyFingerprint
= "ssh-ed25519 256 xirJmD/0DgUenJZ7msgH+jEsE+1J/QbYK7rQu0ZpFV8="
Are you sure that this is your exact code?

The error message shows otherwise. It looks like you have too many quotes in the code (in red):

"Host key does not match configured key ""ssh-ed25519 256 xirJmD/0DgUenJZ7msgH+jEsE+1J/QbYK7rQu0ZpFV8=""!"
"Host key fingerprint is ssh-ed25519 256 xirJmD/0dgUenJZ7msgH+jEsE+1J/QbYK7rQu0ZpFV8=."
"Authentication failed."

If it does not help, please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

AxelG
Joined:
Posts:
3

SshHostKeyFingerprint

Yes, this is my code exactly:
.SshHostKeyFingerprint = "ssh-ed25519 256 xirJmD/0DgUenJZ7msgH+jEsE+1J/QbYK7rQu0ZpFV8="
Its exactly the copy of the generated VB.NET-Code from a GUI-Session.

In a Script it works fine with this:
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log=%LOG_PATH% /logsize=5*10M /ini=nul ^
/command ^
"open sftp://sftp-gwg:uVu2-aK8@app.gwg-reutlingen.de/ -hostkey=""ssh-ed25519 256 xirJmD/0dgUenJZ7msgH+jEsE+1J/QbYK7rQu0ZpFV8="""

I have copied my code/mylogfiles in several files, see as attachment.
Thanks for your Help!
Description: The logfile from the Script (that works!).
Description: The logfile from the VB.NET-Project.
Description: Extraction from VB.NET-Assembly-Code.
The line with "Fingerprint"is exactly the same, what a GUI-Session has shown.

Reply with quote

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

Re: SshHostKeyFingerprint

You are have "D" in the code, while there's "d" in the actual fingeprint:

AxelG wrote:

The answer is:
"Host key does not match configured key ""ssh-ed25519 256 xirJmD/0DgUenJZ7msgH+jEsE+1J/QbYK7rQu0ZpFV8=""!"
"Host key fingerprint is ssh-ed25519 256 xirJmD/0dgUenJZ7msgH+jEsE+1J/QbYK7rQu0ZpFV8=."

Reply with quote

Advertisement

You can post new topics in this forum