Skip to content

Commit

Permalink
backup: accept older public key algorithms (#482)
Browse files Browse the repository at this point in the history
mail.ams1.psf.io is using ssh-rsa still, which isn't ideal

but until it is upgraded we need to accept this algorithm
  • Loading branch information
ewdurbin authored Aug 27, 2024
1 parent 2dcd98a commit c9bda76
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions salt/backup/server/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
include:
- backup.base

{# TODO: When we have retired distros older than 20.04, remove this #}
/etc/ssh/ssh_config.d/pubkey.conf:
file.managed:
- contents: |
PubkeyAcceptedAlgorithms +ssh-rsa
- user: root
- group: root
- mode: "0644"

{% for backup, config in salt['pillar.get']('backup-server:backups', {}).items() %}

{{ backup }}-user:
Expand Down
5 changes: 5 additions & 0 deletions salt/ssh/configs/sshd_config.jinja
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Basic configuration
# ===================

# Include sshd_config.d dir for distros that use it
{% if grains["oscodename"] in ["jammy", "noble"] %}
Include /etc/ssh/sshd_config.d/*.conf
{% endif %}

# Either disable or only allow root login via certificates.
{% if salt["pillar.get"]("ssh:allow_root_with_key", False) %}
PermitRootLogin without-password
Expand Down

0 comments on commit c9bda76

Please sign in to comment.