Skip to content
Snippets Groups Projects
Commit 5de6b252 authored by Jörg Sachse's avatar Jörg Sachse
Browse files

fix: set empty CRYPTO_POLICY for sshd to make sure that SSH on RHEL respects...

fix: set empty CRYPTO_POLICY for sshd to make sure that SSH on RHEL respects the custom settings in sshd_config
parent ee67f263
No related branches found
No related tags found
No related merge requests found
--- ---
# man update-crypto-policies for details
- name: make sure that SSH on RHEL respects the custom settings in sshd_config
ansible.builtin.regex_replace:
path: "/etc/sysconfig/sshd"
regexp: "# CRYPTO_POLICY="
line: "CRYPTO_POLICY="
# Only RedHat has the `/etc/sysonfig/` directory structure, so don't run this
# on Debian machines.
when: ansible_os_family == "RedHat"
notify:
- restart sshd
- name: Konfiguration für OpenSSH einspielen - gehärtete Config - name: Konfiguration für OpenSSH einspielen - gehärtete Config
ansible.builtin.blockinfile: ansible.builtin.blockinfile:
path: "/etc/ssh/sshd_config" path: "/etc/ssh/sshd_config"
...@@ -56,6 +68,7 @@ ...@@ -56,6 +68,7 @@
KexAlgorithms diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,curve25519-sha256,curve25519-sha256@libssh.org KexAlgorithms diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,curve25519-sha256,curve25519-sha256@libssh.org
# disable weak Ciphers (crypto algorithms) # disable weak Ciphers (crypto algorithms)
# NVT OID: 1.3.6.1.4.1.25623.1.0.105611 # NVT OID: 1.3.6.1.4.1.25623.1.0.105611
# NVT OID: 1.3.6.1.4.1.25623.1.0.105565
# Also explicitely omit ChaCha ciphers for "Terrapin" (CVE-2023-48795) # Also explicitely omit ChaCha ciphers for "Terrapin" (CVE-2023-48795)
Ciphers aes256-ctr,aes192-ctr,aes128-ctr,aes256-gcm@openssh.com,aes128-gcm@openssh.com Ciphers aes256-ctr,aes192-ctr,aes128-ctr,aes256-gcm@openssh.com,aes128-gcm@openssh.com
# Explicitely omit -ETM MACs for "Terrapin" (CVE-2023-48795) # Explicitely omit -ETM MACs for "Terrapin" (CVE-2023-48795)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment