The manage_sudo.sh script features a way to discover SSH host keys in bulk using the ssh-keyscan tool. This allows (SSH) administrators to recreate a known_hosts file with defunct host keys in an easy way. Use the -d or --discover options to launch a host key discovery for all targets, e.g.:
By default all discovered host keys will be printed on STDOUT and any errors on STDERR. Note that in the above example the host keys have been deliberately shortened for readability.
Redirect STDOUT to update your known_hosts file in full, for example:
Leave a comment