You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs: the known_hosts steps keep ssh-keyscan's comment lines on newer OpenSSH #100
config /etc/nodkey/broker.toml: known_hosts: /etc/nodkey/known_hosts: line 1: the key is not valid base64
The ssh-keyscan of that host wrote its banner comment lines (# HOST:22 SSH-2.0-OpenSSH_...) to stdout, not stderr, so 2>/dev/null kept them. The awk turned each one into NAME HOST:22 SSH-2.0-OpenSSH_..., a line that looks like a host line. On the same day, OpenSSH 9.6 on Ubuntu 24.04 wrote no comment to stdout. So this depends on the OpenSSH version.
Step 3 of the guide does not catch it: ssh-keygen -lf skips the bad lines without a word, so the fingerprint list looked right.
Fix
Keep only the key lines, for example awk '$1 !~ /^#/ {print "NAME", $2, $3}', or filter by key type.
In step 3, also compare the number of lines of the file with the number of fingerprints.
Maybe also: make the broker's error say what it found ("the third field is not a key; is this a comment from ssh-keyscan?").
Done when
Section 6 keeps only key lines, whichever stream ssh-keyscan writes its comments to.
Step 3 would show a line that is not a key.
The OpenSSH version that writes the comments to stdout is named, with a source.
Fixed by #163 (squash commit d6157d7), docs/setup.md section 6.
Section 6 keeps only key lines, whichever stream ssh-keyscan writes its comments to: step 2 now uses awk '$1 !~ /^#/ {print "NAME", $2, $3}'. Checked by hand on a scan with a banner line: the file gets only the key lines.
Step 3 would show a line that is not a key: it compares wc -l of the file with ssh-keygen -lf ... | wc -l, and gives an awk command that prints each line whose second field is not a key type, with its line number. Checked by hand: the old pattern gave 3 lines and 2 fingerprints, and the command showed line 1.
The OpenSSH version is named, with a source: OpenSSH 9.8 and later, openssh-portable commit 1e84d0c (2024-06-14, first in tag V_9_8_P1). Its message says "to stderr", but its code moves the lines from stderr to stdout; the guide says this. Ubuntu 24.04 has 9.6, so it writes them to stderr.
Not done: the better broker error (the issue said "maybe"). The docs fix and the count check meet Done when.
Activity
groupsky commentedon Nov 9, 2026
Fixed by #163 (squash commit d6157d7),
docs/setup.mdsection 6.ssh-keyscanwrites its comments to: step 2 now usesawk '$1 !~ /^#/ {print "NAME", $2, $3}'. Checked by hand on a scan with a banner line: the file gets only the key lines.wc -lof the file withssh-keygen -lf ... | wc -l, and gives anawkcommand that prints each line whose second field is not a key type, with its line number. Checked by hand: the old pattern gave 3 lines and 2 fingerprints, and the command showed line 1.V_9_8_P1). Its message says "to stderr", but its code moves the lines from stderr to stdout; the guide says this. Ubuntu 24.04 has 9.6, so it writes them to stderr.Not done: the better broker error (the issue said "maybe"). The docs fix and the count check meet Done when.