diff --git a/roles/sshd/README.md b/roles/sshd/README.md index 23ef9aa..a8b8e49 100644 --- a/roles/sshd/README.md +++ b/roles/sshd/README.md @@ -10,7 +10,7 @@ Ubuntu 24.04 (noble), the image the molecule scenario runs on. 22.04 (jammy) and - Use it by its fully qualified name, `mortis.kamino.sshd`. - The target must be reachable over SSH and have `ssh-keygen` and `sshd` installed. The role uses `become`. -- Install the public key of `ansible_user` before this role runs (for example with a `user_management` role earlier in the play), so key login works before password authentication is turned off. The role does not install keys. +- Install the public key of `ansible_user` before this role runs (for example with a user-management role earlier in the play), so key login works before password authentication is turned off. The role does not install keys. - `sshd_profile` is set by the calling play: `pve`, `ubuntu_lxc` or `ubuntu_vm`. - The role reads `ansible_user` and sets `ansible_ssh_user` to it for the rest of the play, in case the connection was bootstrapped as root. - Role dependencies are not declared in `meta/main.yml`; the order above is the contract. @@ -60,4 +60,4 @@ The role defines none. - `meta/argument_specs.yml` has only the `main` entry point. `tasks_from: validate.yml` is used by the molecule scenario to load defaults and exercise the guards, not by consumers, so it has no spec. - The `pve` profile sets `PermitRootLogin prohibit-password`. Proxmox cluster SSH (migration, console proxy, replication) logs in as root with keys only. Passwords are already off through `PasswordAuthentication no`; this keeps root key-only if they are ever turned back on. Join nodes through the default API join, not `pvecm add --use_ssh`, which needs root password SSH. - Host key and public key algorithms are `ssh-ed25519` only, except in the `pve` profile, which allows `ssh-ed25519,rsa-sha2-512,rsa-sha2-256` for both: Proxmox cluster SSH (migration, console proxy) checks each node's RSA host key against `/etc/pve/nodes//ssh_known_hosts` and logs in with root's RSA key. SHA-1 `ssh-rsa` stays refused. -- Molecule: `molecule/default`, run in CI on pull requests that change the role. It converges the `ubuntu_lxc` profile; the `pve` profile is checked by rendering its drop-in to a scratch file and parsing it with `sshd -T -f`. +- Molecule: `molecule/default`, run by the Collection's CI. It converges the `ubuntu_lxc` profile; the `pve` profile is checked by rendering its drop-in to a scratch file and parsing it with `sshd -T -f`. diff --git a/roles/sshd/meta/argument_specs.yml b/roles/sshd/meta/argument_specs.yml index 0984681..e7abf88 100644 --- a/roles/sshd/meta/argument_specs.yml +++ b/roles/sshd/meta/argument_specs.yml @@ -7,8 +7,10 @@ argument_specs: Validates the profile and the merged settings, runs C(ssh-keygen -A), installs the drop-in checked with C(sshd -t) and reloads sshd through a handler. - >- - Refuses to run when password authentication is off and public key authentication is not C(yes), and when the C(pve) - profile does not permit root key login (C(PermitRootLogin) must be C(prohibit-password), C(without-password) or C(yes)). + Refuses to run when password authentication is off and public key authentication is not C(yes); when the C(pve) + profile does not permit root key login (C(PermitRootLogin) must be C(prohibit-password), C(without-password) or C(yes)); + when the C(pve) profile's C(HostKeyAlgorithms) or C(PubkeyAcceptedAlgorithms) lacks C(rsa-sha2-512); and when any + profile lists SHA-1 C(ssh-rsa) in either. - Reads C(ansible_user), which is not a role input, and sets C(ansible_ssh_user) to it for the rest of the play. - >- C(sshd_settings_effective), the merged result read by the template and tasks/validate.yml, is deliberately not listed: