Commit Graph

2 Commits (e08d96dad980c697c35cb37bcd7294f9eccf92a2)

Author SHA1 Message Date
John Safranek e08d96dad9 portfwd: check the host key against known_hosts
portfwd links the example client's common code and registers its host
key check, with the SSH server's host name as the context. -Y accepts
any key, with a warning.

- Pass -Y in fwd.test and fwd-bulk.test
- Cover a refused unknown key in client-hostkey.test

Issue: F-10587
2026-11-21 15:33:37 -06:00
John Safranek 799b9f38ca examples: check host keys against known_hosts
The client, scpclient and sftpclient accept a plain host key only when
a "host type key" line of ~/.ssh/known_hosts holds it. An unknown or
changed key is refused, printing its fingerprint and the line to add.
-Y accepts any key, with a warning.

- Check that an x509v3 host certificate names the host by DNS or IP
  subjectAltName, or by common name without one; -X waives a mismatch
- Pass -Y in the tests and CI jobs that connect to a throwaway server
- Seed known_hosts for openssh-interop.test from sshd's host keys
- Add client-hostkey.test for unknown, known, stale and changed keys

Issue: F-7620
2026-11-21 15:33:37 -06:00