Skip to content
Snippets Groups Projects
Commit 666dc3bd authored by Chris Hines's avatar Chris Hines
Browse files

add role ssh-keepalive, which uses keepalive packets to prevent firewalls...

add role ssh-keepalive, which uses  keepalive packets to prevent firewalls closing inactive ssh connections
parent 16115379
No related branches found
No related tags found
1 merge request!87Tweaks
- name: "restart sshd"
service: name=sshd state=restarted
sudo: true
when: ansible_os_family == "RedHat"
- name: "restart ssh"
service: name=ssh state=restarted
sudo: true
when: ansible_os_family == "Debian"
- name: "Set ClientAliveInterval"
lineinfile:
args:
dest: /etc/ssh/sshd_config
regexp: "#?ClientAliveInterval [0-9]+"
line: "ClientAliveInterval 60"
backrefs: yes
sudo: true
notify:
- restart sshd
- restart ssh
- name: "SetClientAliveCountMax"
lineinfile:
args:
dest: /etc/ssh/sshd_config
regexp: "#?ClientAliveCountMax [0-9]+"
line: "ClientAliveCountMax 5"
backrefs: yes
sudo: true
notify:
- restart sshd
- restart ssh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment