Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
awx
/
unnactivate-ssh-root
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
e2b684db
authored
2025-07-09 15:40:21 -0400
by
awx
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Desactivar usuario root
0 parents
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
unnactivate-ssh-root
unnactivate-ssh-root
0 → 100644
View file @
e2b684d
---
- name: Desactivar acceso SSH como root
hosts: all
become: yes
tasks:
- name: Asegurar que 'PermitRootLogin no' esté en sshd_config
lineinfile:
path: /etc/ssh/sshd_config
regexp: '^#?PermitRootLogin\s+.*'
line: 'PermitRootLogin no'
state: present
backrefs: yes
- name: Asegurar que 'UsePAM yes' esté en sshd_config
lineinfile:
path: /etc/ssh/sshd_config
regexp: '^#?UsePAM\s+.*'
line: 'UsePAM yes'
state: present
backrefs: yes
- name: Reiniciar el servicio sshd
service:
name: sshd
state: restarted
\ No newline at end of file
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment