Diferencia entre revisiones de «Guía de hardening para servidores»
De TechShareRoom wiki
Más acciones
Página creada con «=Cambiar puerto ssh= <syntaxhighlight lang="bash "> sudo nano /etc/ssh/sshd_config #Cambiar Port 22 a otro cualquiera #Refrescar systemctl daemon-reload systemctl restart ssh.socket systemctl restart sshd </syntaxhighlight>» |
Sin resumen de edición |
||
| Línea 1: | Línea 1: | ||
=Cambiar puerto ssh= | =Cambiar puerto ssh= | ||
Configuración recomendada | |||
<syntaxhighlight lang="bash "> | <syntaxhighlight lang="bash "> | ||
sudo nano /etc/ssh/sshd_config | sudo nano /etc/ssh/sshd_config | ||
# | Port XX #any different to 22, IMPORTANT open port before! | ||
PermitRootLogin no | |||
PasswordAuthentication no | |||
PubkeyAuthentication yes | |||
MaxAuthTries 3 | |||
LoginGraceTime 30 | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="bash "> | |||
#Refrescar | #Refrescar | ||
systemctl daemon-reload | systemctl daemon-reload | ||
Revisión del 12:32 27 dic 2025
Cambiar puerto ssh
Configuración recomendada
sudo nano /etc/ssh/sshd_config
Port XX #any different to 22, IMPORTANT open port before!
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
MaxAuthTries 3
LoginGraceTime 30#Refrescar
systemctl daemon-reload
systemctl restart ssh.socket
systemctl restart sshd