Repository navigation
docs: keep only key lines from ssh-keyscan in the known_hosts steps - #163
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #100
Since OpenSSH 9.8,
ssh-keyscanprints its banner comment lines on stdout (openssh-portable commit 1e84d0c, 2024-06-14, first in tagV_9_8_P1; its message says "to stderr", but the code moves the lines from stderr to stdout). So2>/dev/nullkept them, and theawkmade them look like host lines.Changes
docs/setup.mdsection 6, step 2: theawkdrops lines that start with#. This works with each OpenSSH version. I did not usessh-keyscan -q: it exists only since 9.8, and older versions fail on it.Progress
ssh-keyscanwrites its comments to.sk-keys, fixed; security review: no critical, high or medium findings. Not done: its optional low note to show how to remove a line; any editor works, and the step says to run the check again)Checked by hand: a file made with the old
awkfrom a scan with a comment line gives 3 lines and 2 fingerprints, and the newawkcommand shows line 1; the new step 2 gives 2 and 2.