Skip to content
Snippets Groups Projects
Commit 0f2f251e authored by Emmanuel Cohen's avatar Emmanuel Cohen
Browse files

Fix for OVH's ssh configuration

parent aa94f9a9
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,11 @@
name: cron
state: restarted
- name: restart sshd
service:
name: sshd
state: restarted
- name: update cache
apt:
force_apt_get: true
......
......@@ -20,6 +20,19 @@
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
- name: enable root login via ssh with key
replace:
dest: /etc/ssh/sshd_config
regexp: '^#PermitRootLogin (yes|without-password|prohibit-password)'
replace: "PermitRootLogin without-password"
notify: restart sshd
- name: remove disabled root login
replace:
dest: /root/.ssh/authorized_keys
regexp: "^no-port-forwarding,(.+) ssh-"
replace: "ssh-"
# FIREWALL
- name: firewall
......
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