Skip to content
Snippets Groups Projects
Verified Commit d5e6e39f authored by Evangelos Foutras's avatar Evangelos Foutras :smiley_cat:
Browse files

tasks/sync-ssh-hostkeys: quiet ssh-keyscan banners

We don't want these comments to be added to docs/ssh-known_hosts.txt.

From OpenSSH 9.8 release notes [1]:

 * ssh-keyscan(1): this tool previously emitted comment lines
   containing the hostname and SSH protocol banner to standard error.
   This release now emits them to standard output, but adds a new
   "-q" flag to silence them altogether.

[1] https://www.openssh.com/txt/release-9.8
parent 9d229b84
No related branches found
No related tags found
No related merge requests found
Pipeline #104913 passed
......@@ -16,7 +16,7 @@
- name: Fetch known_hosts
shell: |
set -eo pipefail
ssh-keyscan -p {{ ansible_port | default(22) }} 127.0.0.1 2>/dev/null \
ssh-keyscan -q -p {{ ansible_port | default(22) }} 127.0.0.1 2>/dev/null \
| sed -E 's/^(\[?)127\.0\.0\.1/\1{{ inventory_hostname }}/' \
| sort
environment:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment