{"id":6414,"date":"2026-03-06T20:53:36","date_gmt":"2026-03-06T20:53:36","guid":{"rendered":"https:\/\/etchenet.com\/?p=6414"},"modified":"2026-05-27T20:31:00","modified_gmt":"2026-05-27T20:31:00","slug":"guide-complet-cles-ssh-pour-serveurs-vps-securite-et-automatisation","status":"publish","type":"post","link":"https:\/\/etchenet.com\/es\/guide-complet-cles-ssh-pour-serveurs-vps-securite-et-automatisation\/","title":{"rendered":"Gu\u00eda completa: Claves SSH para servidores VPS: seguridad y automatizaci\u00f3n"},"content":{"rendered":"<article class=\"wp-block-group alignfull ethet-normalized-page ethet-editorial-page etch-page-shell--transparent has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n\n<section class=\"wp-block-group ethet-editorial-hero has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n\n<div class=\"wp-block-group ethet-editorial-inner has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n\n<p class=\"etch-label ethet-section-kicker ethet-editorial-kicker wp-block-paragraph\">Art\u00edculo<\/p>\n\n\n<h1 class=\"wp-block-heading ethet-editorial-title ethet-gradient-title\">Gu\u00eda completa: Claves SSH para servidores VPS: seguridad y automatizaci\u00f3n<\/h1>\n\n\n<p class=\"ethet-editorial-lead wp-block-paragraph\">Publicado: 6 de marzo de 2026 | Categor\u00eda: IA y automatizaci\u00f3n<\/p>\n\n\n<p class=\"ethet-editorial-meta wp-block-paragraph\">6 de marzo de 2026<\/p>\n\n\n<div class=\"wp-block-group ethet-editorial-tags has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n\n<p class=\"ethet-editorial-tag wp-block-paragraph\">AI<\/p>\n\n<\/div>\n\n<\/div>\n\n<\/section>\n\n\n<section class=\"wp-block-group ethet-editorial-section-card ethet-editorial-card has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n\n<h2 class=\"wp-block-heading ethet-editorial-h2\">Objetivo: \u00bfPor qu\u00e9 necesitas claves SSH para tu VPS?<\/h2>\n\n\n<p class=\"ethet-editorial-p wp-block-paragraph\">Las claves SSH son el m\u00e9todo m\u00e1s seguro para acceder a servidores remotos. A diferencia de las contrase\u00f1as, son:<\/p>\n\n\n<ul class=\"wp-block-list etch-check-list ethet-editorial-checklist\">\n<li><strong>Casi imposible<\/strong> adivinar por fuerza bruta<\/li>\n<li><strong>Ellos no viajan<\/strong> en la red durante la autenticaci\u00f3n<\/li>\n<li><strong>Permiten la automatizaci\u00f3n<\/strong> sin intervenci\u00f3n humana<\/li>\n<li><strong>Eliminar<\/strong> la necesidad de memorizar contrase\u00f1as complejas<\/li>\n<\/ul>\n\n<\/section>\n\n\n<section class=\"wp-block-group ethet-editorial-section-card ethet-editorial-card has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n\n<h2 class=\"wp-block-heading ethet-editorial-h2\">Paso 1: Genera tu par de claves SSH<\/h2>\n\n\n<h3 class=\"wp-block-heading ethet-editorial-h3\">En Windows (PowerShell o Git Bash):<\/h3>\n\n\n<pre class=\"wp-block-code ethet-editorial-code\"><code># Generar una clave ED25519 (recomendado) ssh-keygen -t ed25519 -C &quot;tu-correo@ejemplo.com&quot; # O una clave RSA (m\u00e1s compatible) ssh-keygen -t rsa -b 4096 -C &quot;tu-correo@ejemplo.com&quot;\"<\/code><\/pre>\n\n\n<h3 class=\"wp-block-heading ethet-editorial-h3\">En Linux\/macOS:<\/h3>\n\n\n<pre class=\"wp-block-code ethet-editorial-code\"><code>ssh-keygen -t ed25519 -f ~\/.ssh\/id_ed25519<\/code><\/pre>\n\n\n<p class=\"ethet-editorial-p wp-block-paragraph\"><strong>Archivos generados:<\/strong><\/p>\n\n\n<ul class=\"wp-block-list etch-check-list ethet-editorial-checklist\">\n<li><code>id_ed25519<\/code> \u2192 Clave <strong>privado<\/strong> (\u00a1NUNCA lo compartas!)<\/li>\n<li><code>id_ed25519.pub<\/code> \u2192 Clave <strong>p\u00fablico<\/strong> (el que compartes)<\/li>\n<\/ul>\n\n<\/section>\n\n\n<section class=\"wp-block-group ethet-editorial-section-card ethet-editorial-card has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n\n<h2 class=\"wp-block-heading ethet-editorial-h2\">Paso 2: Configurar el servidor VPS<\/h2>\n\n\n<h3 class=\"wp-block-heading ethet-editorial-h3\">1. Copie la clave p\u00fablica al servidor:<\/h3>\n\n\n<pre class=\"wp-block-code ethet-editorial-code\"><code>M\u00e9todo autom\u00e1tico # (si funciona SSH protegido con contrase\u00f1a): `ssh-copy-id username@your-vps.com` M\u00e9todo manual #: 1. Muestra tu clave p\u00fablica: `cat ~\/.ssh\/id_ed25519.pub` 2. En el servidor, pega: `echo &quot;TU_CLAVE_P\u00daBLICA_AQU\u00cd&quot; &gt;&gt; ~\/.ssh\/authorized_keys`<\/code><\/pre>\n\n\n<h3 class=\"wp-block-heading ethet-editorial-h3\">2. Configure los permisos CORRECTOS (\u00a1IMPORTANTE!):<\/h3>\n\n\n<pre class=\"wp-block-code ethet-editorial-code\"><code>chmod 700 ~\/.ssh chmod 600 ~\/.ssh\/claves_autorizadas<\/code><\/pre>\n\n\n<h3 class=\"wp-block-heading ethet-editorial-h3\">3. Mejorar la seguridad del servidor:<\/h3>\n\n\n<pre class=\"wp-block-code ethet-editorial-code\"><code># Edita la configuraci\u00f3n SSH: sudo nano \/etc\/ssh\/sshd_config # Cambios recomendados: PermitRootLogin prohibit-password PasswordAuthentication no PubkeyAuthentication yes<\/code><\/pre>\n\n<\/section>\n\n\n<section class=\"wp-block-group ethet-editorial-section-card ethet-editorial-card has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n\n<h2 class=\"wp-block-heading ethet-editorial-h2\">Paso 3 de seguridad: Pruebas y verificaci\u00f3n<\/h2>\n\n\n<h3 class=\"wp-block-heading ethet-editorial-h3\">Pruebe la conexi\u00f3n desde su computadora:<\/h3>\n\n\n<pre class=\"wp-block-code ethet-editorial-code\"><code>ssh -i ~\/.ssh\/id_ed25519 usuario@su-vps.com<\/code><\/pre>\n\n\n<h3 class=\"wp-block-heading ethet-editorial-h3\">Verificar autenticaci\u00f3n:<\/h3>\n\n\n<pre class=\"wp-block-code ethet-editorial-code\"><code># En el servidor, vea los registros de autenticaci\u00f3n: `tail -f \/var\/log\/auth.log | grep ssh`<\/code><\/pre>\n\n<\/section>\n\n\n<section class=\"wp-block-group ethet-editorial-section-card ethet-editorial-card has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n\n<h2 class=\"wp-block-heading ethet-editorial-h2\">Paso 4: Automatizaci\u00f3n avanzada<\/h2>\n\n\n<h3 class=\"wp-block-heading ethet-editorial-h3\">1. Archivo de configuraci\u00f3n SSH (~\/.ssh\/config):<\/h3>\n\n\n<pre class=\"wp-block-code ethet-editorial-code\"><code>Host mon-vps HostName 178.33.166.166 User mxjtoroi IdentityFile ~\/.ssh\/id_ed25519 Port 22<\/code><\/pre>\n\n\n<p class=\"ethet-editorial-p wp-block-paragraph\"><strong>Uso simplificado:<\/strong><\/p>\n\n\n<pre class=\"wp-block-code ethet-editorial-code\"><code>ssh my-vps # \u00a1Sin par\u00e1metros!<\/code><\/pre>\n\n\n<h3 class=\"wp-block-heading ethet-editorial-h3\">2. Agente SSH (gesti\u00f3n de claves):<\/h3>\n\n\n<pre class=\"wp-block-code ethet-editorial-code\"><code># Inicie el agente: Start-Service ssh-agent # Agregue la clave: ssh-add ~\/.ssh\/id_ed25519<\/code><\/pre>\n\n\n<h3 class=\"wp-block-heading ethet-editorial-h3\">3. T\u00faneles SSH (para desarrollo):<\/h3>\n\n\n<pre class=\"wp-block-code ethet-editorial-code\"><code># Redirecci\u00f3n de puerto ssh -L 8080:localhost:80 user@vps.com # T\u00fanel inverso (acceso desde fuera) ssh -R 2222:localhost:22 user@vps.com<\/code><\/pre>\n\n<\/section>\n\n\n<section class=\"wp-block-group ethet-editorial-section-card ethet-editorial-card has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n\n<h2 class=\"wp-block-heading ethet-editorial-h2\">Problemas y soluciones comunes<\/h2>\n\n\n<h3 class=\"wp-block-heading ethet-editorial-h3\">\u25ba \u00abPermiso denegado (clave p\u00fablica)\u00bb<\/h3>\n\n\n<p class=\"ethet-editorial-p wp-block-paragraph\"><strong>Causas:<\/strong><\/p>\n\n\n<ul class=\"wp-block-list etch-check-list ethet-editorial-checklist\">\n<li>Permisos incorrectos en <code>~\/.ssh\/claves_autorizadas<\/code><\/li>\n<li>Clave p\u00fablica formateada incorrectamente<\/li>\n<li>Configuraci\u00f3n de SSH que bloquea al usuario<\/li>\n<\/ul>\n\n\n<p class=\"ethet-editorial-p wp-block-paragraph\"><strong>Soluci\u00f3n :<\/strong><\/p>\n\n\n<pre class=\"wp-block-code ethet-editorial-code\"><code># Comprobar permisos ls -la ~\/.ssh\/ # Recrear authorized_keys echo &quot;exact-public-key&quot; &gt; ~\/.ssh\/authorized_keys chmod 600 ~\/.ssh\/authorized_keys<\/code><\/pre>\n\n\n<h3 class=\"wp-block-heading ethet-editorial-h3\">Clave rechazada por el servidor<\/h3>\n\n\n<p class=\"ethet-editorial-p wp-block-paragraph\"><strong>Depuraci\u00f3n:<\/strong><\/p>\n\n\n<pre class=\"wp-block-code ethet-editorial-code\"><code>ssh -v user@vps.com # Modo detallado<\/code><\/pre>\n\n<\/section>\n\n\n<section class=\"wp-block-group ethet-editorial-section-card ethet-editorial-card has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n\n<h2 class=\"wp-block-heading ethet-editorial-h2\">Objetivo: Casos de uso pr\u00e1cticos<\/h2>\n\n\n<h3 class=\"wp-block-heading ethet-editorial-h3\">1. Despliegue automatizado (CI\/CD):<\/h3>\n\n\n<pre class=\"wp-block-code ethet-editorial-code\"><code># .github\/workflows\/deploy.yml pasos: - usa: actions\/checkout@v2 - nombre: Implementar en VPS usa: appleboy\/ssh-action@master con: host: ${{ secrets.VPS_HOST }} nombre de usuario: ${{ secrets.VPS_USER }} clave: ${{ secrets.SSH_PRIVATE_KEY }}<\/code><\/pre>\n\n\n<h3 class=\"wp-block-heading ethet-editorial-h3\">2. Copias de seguridad automatizadas:<\/h3>\n\n\n<pre class=\"wp-block-code ethet-editorial-code\"><code>#!\/bin\/bash # backup-automatique.sh ssh my-vps &quot;tar -czf \/backup\/site-$(date +%Y%m%d).tar.gz \/var\/www\/html&quot; scp my-vps:\/backup\/*.tar.gz ~\/sauvegardes\/<\/code><\/pre>\n\n\n<h3 class=\"wp-block-heading ethet-editorial-h3\">3. Monitoreo remoto:<\/h3>\n\n\n<pre class=\"wp-block-code ethet-editorial-code\"><code>Script de monitorizaci\u00f3n SSH de # Mon-vps &quot;df -h; free -m; uptime&quot;\"<\/code><\/pre>\n\n<\/section>\n\n\n<section class=\"wp-block-group ethet-editorial-section-card ethet-editorial-card has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n\n<h2 class=\"wp-block-heading ethet-editorial-h2\">Seguridad Mejores pr\u00e1cticas de seguridad<\/h2>\n\n\n<ul class=\"wp-block-list etch-check-list ethet-editorial-checklist\">\n<li><strong>Utilice ED25519<\/strong> en lugar de RSA (m\u00e1s seguro y r\u00e1pido)<\/li>\n<li><strong>Proteja su clave privada<\/strong> con una contrase\u00f1a<\/li>\n<li><strong>Utilice claves diferentes<\/strong> para diferentes servidores<\/li>\n<li><strong>Revocar las claves<\/strong> los viejos regularmente<\/li>\n<li><strong>Monitorear los registros<\/strong> autenticaci\u00f3n<\/li>\n<\/ul>\n\n<\/section>\n\n\n<section class=\"wp-block-group ethet-editorial-section-card ethet-editorial-card has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n\n<h2 class=\"wp-block-heading ethet-editorial-h2\">Etapa de conclusi\u00f3n<\/h2>\n\n\n<p class=\"ethet-editorial-p wp-block-paragraph\">Dominar las claves SSH es <strong>b\u00e1sico<\/strong> Para cualquier administrador de VPS. Esto no solo mejora la seguridad, sino que tambi\u00e9n permite:<\/p>\n\n\n<ul class=\"wp-block-list etch-check-list ethet-editorial-checklist\">\n<li>\u2713 <strong>Automatizaci\u00f3n<\/strong> tareas repetitivas<\/li>\n<li>\u2713 <strong>Los despliegues<\/strong> continuo sin intervenci\u00f3n<\/li>\n<li>\u2713 <strong>Acceso seguro<\/strong> desde varios dispositivos<\/li>\n<li>\u2713 <strong>Integraci\u00f3n<\/strong> con herramientas modernas de DevOps<\/li>\n<\/ul>\n\n\n<p class=\"ethet-editorial-p wp-block-paragraph\"><strong>\u00bfListo para mejorar la seguridad de su VPS?<\/strong> Comience hoy mismo generando su primera clave ED25519.<\/p>\n\n\n<p class=\"ethet-editorial-p wp-block-paragraph\"><strong>Recursos Recursos adicionales:<\/strong><\/p>\n\n\n<ul class=\"wp-block-list etch-check-list ethet-editorial-checklist\">\n<li><a href=\"https:\/\/www.openssh.com\/\" target=\"_blank\" rel=\"noopener\">Documentaci\u00f3n oficial de OpenSSH<\/a><\/li>\n<li><a href=\"https:\/\/infosec.mozilla.org\/guidelines\/openssh\" target=\"_blank\" rel=\"noopener\">Gu\u00eda de seguridad SSH de Mozilla<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/FiloSottile\/age\" target=\"_blank\" rel=\"noopener\">Herramientas de gesti\u00f3n de claves SSH<\/a><\/li>\n<\/ul>\n\n<\/section>\n\n<\/article>","protected":false},"excerpt":{"rendered":"<p>Article Guide Complet : Cl\u00e9s SSH pour Serveurs VPS &#8211; S\u00e9curit\u00e9 et Automatisation Publi\u00e9 : 6 mars 2026 | Cat\u00e9gorie : IA &amp; Automatisation mars 6, 2026 IA Objectif Pourquoi avez-vous besoin de cl\u00e9s SSH pour votre VPS ? Les cl\u00e9s SSH sont la m\u00e9thode la plus s\u00e9curis\u00e9e pour acc\u00e9der aux serveurs distants. Contrairement aux [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":6698,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_svbs_page_enabled":false,"_svbs_page_video_id":0,"_svbs_page_video_url":"","_svbs_page_overlay_color":"#020617","_svbs_page_overlay_opacity":0.45,"_svbs_page_scroll_range":0,"_svbs_page_scroll_range_desktop":0,"_svbs_page_scroll_range_tablet":0,"_svbs_page_scroll_range_mobile":0,"_svbs_page_start_time":0,"_svbs_page_end_time":0,"_svbs_page_mobile_behavior":"enabled","_svbs_page_z_index":0,"footnotes":""},"categories":[82],"tags":[126,127,109,128],"class_list":["post-6414","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ia","tag-assistant-ia","tag-gnration","tag-ia","tag-outils"],"_links":{"self":[{"href":"https:\/\/etchenet.com\/es\/wp-json\/wp\/v2\/posts\/6414","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/etchenet.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/etchenet.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/etchenet.com\/es\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/etchenet.com\/es\/wp-json\/wp\/v2\/comments?post=6414"}],"version-history":[{"count":4,"href":"https:\/\/etchenet.com\/es\/wp-json\/wp\/v2\/posts\/6414\/revisions"}],"predecessor-version":[{"id":7977,"href":"https:\/\/etchenet.com\/es\/wp-json\/wp\/v2\/posts\/6414\/revisions\/7977"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/etchenet.com\/es\/wp-json\/wp\/v2\/media\/6698"}],"wp:attachment":[{"href":"https:\/\/etchenet.com\/es\/wp-json\/wp\/v2\/media?parent=6414"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/etchenet.com\/es\/wp-json\/wp\/v2\/categories?post=6414"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/etchenet.com\/es\/wp-json\/wp\/v2\/tags?post=6414"}],"curies":[{"name":"gracias","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}