diff options
| author | Shulhan <m.shulhan@gmail.com> | 2026-03-27 06:10:04 +0700 |
|---|---|---|
| committer | Shulhan <m.shulhan@gmail.com> | 2026-03-27 06:10:04 +0700 |
| commit | e6291d1382827c5f725dc056babd75974c74253e (patch) | |
| tree | d6b3cf23abef7ab13fd39c4d516fdbc70cd3fe17 /ssh/testdata/Client-RunCommandStdinError | |
| parent | 045799b6f22dffa15d613442ca89999d240579b7 (diff) | |
| download | go-x-crypto-e6291d1382827c5f725dc056babd75974c74253e.tar.xz | |
ssh/knownhosts: implements DB interface
There is an issue with current SSH client implementation.
Given a single host public key in the known_hosts file,
host ssh-ed25519 key...
Calling ssh.Dial(`tcp`, "host", ...) will return an error
knownhosts: key mismatch
from [handshakeTransport.enterKeyExchange], because only key
"mlkem768x25519-sha256" is checked on the client side.
This changes add DB interface for knownhosts that have two methods:
- HostKeyAlgorithms: return the host key that matches in known_hosts
based on the "host" name or address for
[ssh.ClientConfig.HostKeyAlgorithms].
- HostKeyCallback: return the ssh.HostKeyCallback for
[ssh.ClientConfig.HostKeyCallback].
Author: Faye Salwin
Reference: https://go-review.googlesource.com/c/crypto/+/154458
Diffstat (limited to 'ssh/testdata/Client-RunCommandStdinError')
0 files changed, 0 insertions, 0 deletions
