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

Handle zero byte ssh key files #5306

Closed
wants to merge 1 commit into from

Commits on May 20, 2024

  1. Handle zero byte ssh key files

    Sometimes, due to file system corruption from a linux kernel crash or for some
    other reasons, the system may be left with zero byte ssh keyfiles. These zero
    byte files are of no use and generate errors like the following upon next
    reboot:
    sshd[1454]: Unable to load host key: /etc/ssh/ssh_host_rsa_key
    sshd[1454]: Unable to load host key "/etc/ssh/ssh_host_ecdsa_key": invalid format
    
    Therefore, we should check for the presence of zero-byte files and if found
    delete and regenerate the key files in order to recover from the error.
    
    Fixes: canonicalGH-5305
    Signed-off-by: Ani Sinha <anisinha@redhat.com>
    ani-sinha committed May 20, 2024
    Configuration menu
    Copy the full SHA
    bb8843c View commit details
    Browse the repository at this point in the history