rchouinard.secure_sshd
Rôle Ansible pour SSHd Sécurisé
Ce rôle fournit une configuration moderne de serveur shell sécurisé basée sur les lignes directrices Infrasec de Mozilla.
La configuration par défaut permet l'authentification par mot de passe. Si vous préférez
n'autoriser que l'authentification par clé, assurez-vous d'ajuster sshd_authmethods
en conséquence.
Exigences
- Ansible 2.4+
Variables du Rôle
sshd_hostkeys:
- /etc/ssh/ssh_host_ed25519_key
- /etc/ssh/ssh_host_rsa_key
- /etc/ssh/ssh_host_ecdsa_key
sshd_kexalgorithms:
- [email protected]
- ecdh-sha2-nistp521
- ecdh-sha2-nistp384
- ecdh-sha2-nistp256
- diffie-hellman-group-exchange-sha256
sshd_ciphers:
- [email protected]
- [email protected]
- [email protected]
- aes256-ctr
- aes192-ctr
- aes128-ctr
sshd_macs:
- [email protected]
- [email protected]
- [email protected]
- hmac-sha2-512
- hmac-sha2-256
- [email protected]
sshd_authmethods:
- publickey
- password
sshd_loglevel: VERBOSE
sshd_subsystems:
- "sftp /usr/libexec/openssh/sftp-server -f AUTHPRIV -l INFO"
sshd_permitrootlogin: "non"
sshd_extra: |
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS
Dépendances
Aucune.
Exemple de Playbook
- hosts: localhost
roles:
- rchouinard.secure_sshd
Licence
La Licence MIT (MIT). Veuillez consulter le fichier de licence pour plus d'informations.
Installer
ansible-galaxy install rchouinard.secure_sshd
Licence
mit
Téléchargements
2k
Propriétaire
DevOps Engineer at Paymentus