Browse Source

Add variables for sshd_allow_tcp_forwarding and sshd_max_sessions

main
Daniele Tricoli 4 months ago
parent
commit
ede9ac4478
  1. 3
      roles/sshd/defaults/main.yml
  2. 4
      roles/sshd/tasks/main.yml

3
roles/sshd/defaults/main.yml

@ -3,3 +3,6 @@ sshd_become: true
sshd_become_user: root
sshd_port: 22
sshd_allow_tcp_forwarding: "no"
sshd_max_sessions: 2

4
roles/sshd/tasks/main.yml

@ -30,11 +30,11 @@
- regexp: "^#?AllowAgentForwarding"
line: "AllowAgentForwarding no"
- regexp: "^#?AllowTcpForwarding"
line: "AllowTcpForwarding no"
line: "AllowTcpForwarding {{ sshd_allow_tcp_forwarding }}"
- regexp: "^#?MaxAuthTries"
line: "MaxAuthTries 3"
- regexp: "^#?MaxSessions"
line: "MaxSessions 2"
line: "MaxSessions {{ sshd_max_sessions }}"
- regexp: "^#?PasswordAuthentication"
line: "PasswordAuthentication no"
- regexp: "^#?PermitRootLogin"

Loading…
Cancel
Save