Skip to content

Instantly share code, notes, and snippets.

@TTimo
Created August 27, 2014 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TTimo/d2b8c8b82193d3b8b079 to your computer and use it in GitHub Desktop.
Save TTimo/d2b8c8b82193d3b8b079 to your computer and use it in GitHub Desktop.
sshd_root_login:
file.replace:
- name: /etc/ssh/sshd_config
- pattern: ".*PermitRootLogin .*"
- repl: "PermitRootLogin no"
ssh:
service.restart:
- onchanges:
- file: sshd_root_login
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment