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

Avoid using APT to generate SSH host keys #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Oct 10, 2024

  1. Avoid using APT to generate SSH host keys

    Techniques that leverage the openssh-server package’s postinst script
    risk two conflicts:
    
      - When ssh.service has been started by APT, attempting to trigger the
        postinst script by starting another instance of APT deadlocks.
    
      - When ssh.service has been started manually, the postinst script in
        the unit dependency causes the proximal activation to be canceled.
    
    To avoid these complications, invoke ssh-keygen directly. The -A option
    does exactly what we need:
    
    > Generate host keys of all default key types (rsa, ecdsa, and ed25519)
    > if they do not already exist.
    AndrewKvalheim committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    5bfa1b9 View commit details
    Browse the repository at this point in the history