Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure ssh client not to store host keys for floating hostnames #716

Merged
merged 1 commit into from
Sep 18, 2024

Commits on Sep 18, 2024

  1. Configure ssh client not to store host keys for floating hostnames

    Some of our hosts are redundant with keepalived in a primary/backup
    pattern, and we sometimes want to use them as jump hosts with ssh.
    
    Usually ssh will proxy through the primary host, but in those rare
    moments where the backup is claiming the IP address, we still want to
    connect, even though the backup host has different ssh host keys.
    
    Even when /etc/ssh/ssh_known_hosts is managed, the ssh client will also
    store keys in the user's known_hosts file, resulting in the possibility
    of failed ssh connections while e.g. in the middle of a reboot.
    
    We can't configure ssh not to save the host keys, but we can configure
    it to write them to /dev/null. We also set the log level to ERROR
    because otherwise every single connection will yell that this is the
    first time it's seen this server and it's saving the host keys in
    /dev/null.
    daaang committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    0aa59eb View commit details
    Browse the repository at this point in the history