Skip to content

Instantly share code, notes, and snippets.

@TTimo
Last active August 29, 2015 14:05
Show Gist options
  • Save TTimo/e7249daf3d1b55366738 to your computer and use it in GitHub Desktop.
Save TTimo/e7249daf3d1b55366738 to your computer and use it in GitHub Desktop.
sshd_root_login:
file.replace:
- name: /etc/ssh/sshd_config
- pattern: ".*PermitRootLogin .*"
- repl: "PermitRootLogin no"
"service ssh restart":
cmd.run:
- onchanges:
- file: sshd_root_login
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment