rchouinard.secure_sshd

Sichere SSHd Ansible Rolle

Diese Rolle bietet eine moderne Konfiguration für einen sicheren Shell-Server, basierend auf den Infrasec-Richtlinien von Mozilla.

Die standardmäßige Konfiguration erlaubt die Authentifizierung mit Passwort. Wenn Sie nur die Authentifizierung mit Schlüsseln erlauben möchten, stellen Sie sicher, dass Sie sshd_authmethods entsprechend anpassen.

Anforderungen

  • Ansible 2.4+

Rollenvariablen

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: "nein"

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

Abhängigkeiten

Keine.

Beispiel Playbook

- hosts: localhost
  roles:
    - rchouinard.secure_sshd

Lizenz

Die MIT-Lizenz (MIT). Bitte sehen Sie die Lizenzdatei für weitere Informationen.

Über das Projekt

Secure SSH based on Mozilla's modern guidelines

Installieren
ansible-galaxy install rchouinard.secure_sshd
GitHub Repository
Lizenz
mit
Downloads
2k
Besitzer
DevOps Engineer at Paymentus