ssh-ed25519 fingerprint is invalid (in HostKeyEventArgs) with older servers
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 993
- Avg merge
- 9d 21h
- Merged PRs (30d)
- 1
Description
Fantastic library, amazingly easy to use - thank you!. The library version 2020.0.1 seems to fail to provide a correct fingerprint (MD5) for e.HostKeyName that equals to "ssh-ed25519". The HostKeyEventArgs (e.Fingerprint) contains 16 bytes that absolutely don't match OS X ssh (nor Windows 10 built-in ssh command output.) I even made sure to execute the command like below to ensure I am requesting the "ssh-ed25519" (to match what's reported by e.HostKeyName).
The ssh command: ssh admin@host-address -o HostKeyAlgorithms=ssh-ed25519 -o FingerprintHash=md5
Please help! The library works correctly with e.HostKeyName of "ssh-rsa", but "ssh.net" doesn't pick "rsa" when connecting to AWS Ubuntu hosts in 2021.
How to reproduce:
- Connect to an AWS Linux host (Debian versions as recent as 2017),
- The e.HostKeyName will be "ssh-ed25519"
- The e.Fingerprint will "not" match the "ssh" command executed manually.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the HostKeyEventArgs entry point and inspect how e.Fingerprint is produced for the ssh-ed25519 host key. Reproduce against an AWS Linux host using the stated ssh command with FingerprintHash=md5, then compare the library's 16-byte fingerprint with the OS outputs. Done means the ssh-ed25519 fingerprint matches the command-line result while ssh-rsa behavior remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- networking, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100