[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previaÚltima revisiónAmbos lados, revisión siguiente | ||
es:howtos:security:ssh [2019/03/24 16:12 (UTC)] – [Alternate method of Changing the SSH default port without changing] antares_alf | es:howtos:security:ssh [2019/03/24 20:32 (UTC)] – [See Also] antares_alf | ||
---|---|---|---|
Línea 48: | Línea 48: | ||
Esta sugerencia es completamente sacada de otro sitio. [[http:// | Esta sugerencia es completamente sacada de otro sitio. [[http:// | ||
- | La idea aquí es agregar una llamada a este script en '' | + | La idea aquí es agregar una llamada a este script en '' |
+ | < | ||
+ | if [ -x / | ||
+ | / | ||
+ | fi | ||
+ | </ | ||
- | Para usar el ejemplo de descarga en la parte inferior, cámbielo a su gusto y guárdelo en ''/ | + | Lo que está haciendo es hacer que parezca que ha cambiado |
- | Agregue este ejemplo a continuación a ''/ | + | Lo que sucede es que los escáneres continuarán viendo el puerto 22 abierto e intentarán ir allí mientras su servidor deja caer esos paquetes, porque el encabezado no está dañado. Los paquetes reales vienen en el puerto |
- | + | ||
- | #Agregar ssh_hide al puerto | + | |
- | if [ -x / | + | |
- | / | + | |
- | fi | + | |
- | + | ||
- | What it is doing is making it look like you changed the port ssh is using and provide some additional security. | + | |
- | What happens is scanners will continue to see port 22 open and try to go there while your server drops those packets, because the header is not mangled. Real packets come in on port 8889 and are redirected by iptables | + | |
<file bash rc.ssh_hide> | <file bash rc.ssh_hide> | ||
Línea 93: | Línea 90: | ||
</ | </ | ||
- | Note not ipv6 compatible, | + | Tenga en cuenta que no es compatible |
+ | ===== Prohibir el acceso root a su máquina ===== | ||
- | ===== Forbid root access to your machine ===== | + | Este es probablemente el cambio más importante que puede hacer para mejorar la seguridad de su máquina: prohibir que el usuario |
- | + | ||
- | + | ||
- | This is probably the single most important change you can do to improve the security of your machine: forbid the '' | + | |
'' | '' | ||
- | And change it to: | + | Y cambiarlo a: |
'' | '' | ||
- | If you apply the changes above, make sure you have at least one user on your machine that can '' | + | Si aplica los cambios anteriores, asegúrese de tener al menos un usuario en su máquina que pueda (cambiar de usuario) |
- | Since most people who try to get into your machine uninvited use brute-force | + | Ya que la mayoría de las personas que intentan ingresar a su máquina sin ser invitadas usan scripts |
- | ===== Improve login security and timing | + | ===== Mejorar la seguridad de inicio de sesión y el tiempo |
+ | Arriba y debajo de la opción '' | ||
- | Above and below the '' | + | - '' |
- | + | ||
- | - '' | + | |
'' | '' | ||
- | - '' | + | - '' |
'' | '' | ||
- | ===== Deny X11 forwarding | + | ===== Denegar reenvío |
- | + | A menos que necesite usar X11 sobre SSH, puede desactivarlo de manera segura usando la siguiente opción: | |
- | Unless you need to use X11 over SSH, you can safely disable it by using the following option: | + | |
'' | '' | ||
- | Please note that disabling | + | Tenga en cuenta que deshabilitar |
- | ===== Restrict | + | ===== Restringir el inicio de sesión |
- | + | Si está seguro de que solo usuarios específicos necesitan conectarse a través de SSH a su máquina, puede declararlos usando la opción | |
- | If you are sure only specific users need to connect through | + | |
'' | '' | ||
- | In the example shown above, only user '' | + | En el ejemplo que se muestra arriba, solo el usuario |
- | ===== Restart the SSH server ===== | ||
+ | ===== Reinicie el servidor SSH ===== | ||
- | The last thing to do, to make sure the SSH server takes the new configuration into account, is to restart the SSH server with the command: | + | Lo último que debe hacer, para asegurarse de que el servidor |
''# | ''# | ||
- | Your new, and slightly more secure | + | Su nueva y más segura configuración de OpenSSH |
- | + | ===== Ver también | |
- | ===== See Also ===== | + | |
- | * [[http:// | + | * [[http:// |
====== Sources ====== | ====== Sources ====== |