[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.

Welcome to the Slackware Documentation Project

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Próxima revisión
Revisión previa
es:howtos:security:sshkeys [2019/02/11 01:45 (UTC)] – creado slackwarespanoles:howtos:security:sshkeys [2021/09/12 08:29 (UTC)] (actual) – [Configure su clave pública en la computadora remota] antares_alf
Línea 1: Línea 1:
 <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). -->
-====== How to use SSH keys to connect without a password. ======+====== Cómo utilizar las llaves SSH para conectarse sin una contraseña. ======
  
-[[http://www.openssh.org|OpenSSH]] is a very secure way to connect remotely to a Slackware machineBut the easiest way to use SSH is to use its key facility.+[[http://www.openssh.org|OpenSSH]] es una forma muy segura de conectarse de forma remota una máquina Slackware. Pero la forma más fácil de usar SSH es, simplemente, usar sus llaves.
  
-The concept of public/private keys can be hard to explainwe will try to go through it in as simple a manner as possible.+El concepto de claves públicas/privadas puede ser difícil de explicartrataremos de hacerlo de la manera más simple posible. 
 +<note>Permítanme decir esto de nuevo, para todos ustedes, crypto nerds allí afuera: Sí, ya sé que esta es una versión muy simplificada de SSH. Esto se crea para todos los novatos SSH... mmmmkay?</note>
  
-<note>Allow me to say this againfor all of you, crypto nerds out there: yes, I know this is a very simplified version of SSH. This is created for all the SSH newbies... mmmmkay?</note>+Esencialmentelas llaves SSH se basan en la criptografía de clave públicaEsto significa que creas //__dos__// claves: una se llama llave pública y se usa para cifrar datos que solo usted puede descifrarPuede dar su llave pública a cualquier persona, ya que su única función es cifrar datos - No hay mucho más que puedas hacer con élLa otra llave se llama llave PRIVADA, y es esta llave la que se utiliza para descifrar los datos cifrados con la llave pública.
  
-Essentially, SSH keys are based on public key cryptographyThis means you create //__two__// keys: one is called the public key, and it is used to encrypt data that only you can decryptYou can give your public key to anyone, since its only function is to encrypt data - there is not much more you can do with itThe other key is called the PRIVATE keyand it is this key that is used to decrypt data encrypted with the public key.+Hasta ahora todo bien ... Ahora¿cómo se usa esto con SSH?
  
-So far so good... Nowhow is this used with SSH+Cada vez que se comunique con una máquina Slackware (o cualquier máquina que ejecute OpenSSHen realidad) a través del protocolo SSH, su SSH //__cliente__// (el programa, instalado en la computadora que tiene delante, que utiliza para conectarse) hablará con el SSH //__server__// instalado en la máquina distante. Determinarán en conjunto las capacidades que ambos pueden usar y la versión del protocolo que deben usar para comunicarse de forma segura.
  
-Whenever you contact a Slackware machine (or any machine running OpenSSH, reallythrough the SSH protocolyour SSH //__client__// (the program, installed on the computer in front of you, that you use to connectwill talk to the SSH //__server__// installed on the distant machineThey will determine together the capabilities that they both can useand the protocol version they should use to communicate securely.+Luego, intentarán determinar cómo usted (el usuarioiniciará sesión en la máquina remota. Si no se usan las clavesusualmente SSH (pero no siemprepredeterminará para pedirle una contraseñaPor otro ladosi se usan claves, las máquinas las usarán en el siguiente orden:
  
 Then, they will try to determine how you (the user) will login on the remote machine. If keys are not used, SSH will usually (but not always) default to asking you a password. On the other hand, if keys are used, the machines are going to use them in the following order: Then, they will try to determine how you (the user) will login on the remote machine. If keys are not used, SSH will usually (but not always) default to asking you a password. On the other hand, if keys are used, the machines are going to use them in the following order:
  
-  - The SSH server will encrypt a short message (technically a hash valuewith your public key and send it to your computer+  - El servidor SSH cifrará un mensaje corto (técnicamente un valor hash) con su llave pública y lo enviará a su computadora
-  - Your SSH client will decrypt this message with the private key (whose only copy should be on your computer), and send it back to the SSH server+  - Su cliente de SSH descifrará este mensaje con la clave privada (cuya única copia debe estar en su computadoray lo enviará de vuelta al servidor de SSH. 
-  - The SSH server will then be satisfied that you "are you" so to speaksince you are theoretically the only person able to decrypt the message sentand will grant you access immediately.+  - El servidor de SSH estará satisfecho de que usted 'sea usted'por así decirloya que teóricamente es la única persona capaz de descifrar el mensaje enviado y le otorgará acceso de inmediato. 
 +Si todo esto parece un poco complicado, solo recuerda esto: tienes una clave pública y una privada. La clave pública debe estar en la computadora a la que desea acceder, o la computadora 'remota'. La clave privada debe estar en su computadora.
  
-If this all seems bit complicated, just remember this simple thing: you have public key and a private key. The public key should be on the computer you want access to, or the "remote" computer. The private key should be on your computer.+¡Vamos pasar por este proceso paso paso!
  
-Let's go through this process step by step! 
  
  
-===== Create the public/private key pair =====+===== Crear el par de claves pública/privada =====
  
- +Para crear una clave pública y una privada, use la utilidad OpenSSH ''ssh-keygen''Esto generará automáticamente un par de clavesutilizando los valores predeterminadosAquí hay un pequeño ejemplo:
-To create a public and a private key, use the OpenSSH ''ssh-keygen'' utilityThis will automatically generate a key pairusing the default valuesHere is a small example:+
  
 <code> <code>
Línea 56: Línea 56:
 </code> </code>
  
-OK, what is going on here+OK, ¿qué está pasando aquí
-First, ''ssh-keygen'' is going to generate a key pairSo farso goodplease make sure you read the [[http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-keygen&apropos=0&sektion=1&manpath=OpenBSD+5.1&arch=i386&format=html|ssh-keygen man page]] to understand all the optionsand there are many of them.+Primero, ''ssh-keygen'' generará un par de clavesHasta ahoratodo bienasegúrese de leer el 
 +[[http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-keygen&apropos=0&sektion=1&manpath=OpenBSD+5.1&arch=i386&format=html|ssh-keygen man page]] entender todas las opcionesy hay muchas de ellas.
  
-Next, ''ssh-keygen'' is going to respond that it is creating the RSA key pair (public and private key). RSA is the name of the encryption algorithm usedThere are three such encryption possible: DSA, RSA and ECDSA. Which one is the best is left as an exercice for the reader...  ;-) +A continuación, ''ssh-keygen'' responderá que está creando el par de claves RSA (clave pública y privada). RSA es el nombre del algoritmo de cifrado utilizadoHay tres tipos de cifrado posibles: DSA, RSA ECDSA. Cuál es el mejor se deja como ejercicio para el lector ... ;-)
  
-It is then going to ask you where to save the keyHere, ''TEST.rsa'' is enteredsince there are other keys on the systemGiving proper name to the key is importantsince it makes it much easier to remember which key connects to what.+Luego le preguntará dónde guardar la claveAquí se ingresa ''TEST.rsa'', ya que hay otras claves en el sistemaEs importante dar un nombre propio la claveya que hace que sea mucho más fácil recordar a qué se conecta cada clave.
  
-For instanceif you had an account on a machine named: ''stang.slackware.com'', a good name for the key pair would be ''stang_slackware_com.rsa'' or some such.+Por ejemplosi tuviera una cuenta en una máquina llamada: ''stang.slackware.com'', un buen nombre para el par de claves sería ''stang_slackware_com.rsa'' o algo así.
  
-Next, ''ssh-keygen'' asks you for a passphraseIt is always a good idea to enter a passphraseThis allows you to protect your private keyeven if it falls into the wrong handsIf you are absolutely, 100% sure that your private key is **not** going to fall into the wrong hands (how optimistic you are!), just press ''Enter'' here.+A continuación, ''ssh-keygen'' le pide una frase de contraseña¡Siempre es una buena idea ingresar una frase de contraseñaEsto le permite proteger su clave privadaincluso si cae en las manos equivocadasSi está absolutamente seguro al 100% de que su clave privada **no** va a caer en las manos equivocadas (¡qué optimista es!), Simplemente presione ''Entrar'' aquí.
  
-The rest are just informative messages, and you will note that the key pair has been saved as follows: 
  
-  - The private key is named ''TEST.rsa''+El resto son solo mensajes informativos, y notará que el par de claves se ha guardado de la siguiente manera:
-  - The public key - the one you want to copy on the remote machine - is named ''TEST.rsa.pub''+
  
-Congratulations! You are halfway there!+  - La clave privada se llama ''TEST.rsa''
 +  - La clave pública, la que desea copiar en la máquina remota, se llama ''TEST.rsa.pub''
  
-===== Configure your public key on the remote computer =====+¡Felicidades! Estás a medio camino!
  
 +===== Configure su clave pública en la computadora remota =====
  
-All rightnowhow to use the public/private keyThat'simple enoughcopy the public key (named ''TEST.rsa.pub'' as we have seenonto the remote computerThe best way to do this is to use ''scp'' the OpenSSH secure copy programFor instance:+Muy bienahora¿cómo usar la clave pública/privadaEso es bastante simple: copie la //clave pública// (llamada ''TEST.rsa.pub'' como hemos vistoen la computadora remotaLa mejor manera de hacer esto es usar ''scp'' el programa de copia segura OpenSSH. Por ejemplo:
  
 <code> <code>
Línea 83: Línea 84:
 </code> </code>
  
-In the example aboveI copy the //__public__// key ''TEST.rsa.pub'' on the remote machine named ''test.example.com'', as user ''nr''The file is renamed ''authorized_keys'' which is the name of the file that contains all the public keys authorized to connect to the server.+En el ejemplo anteriorcopió la //clave pública// ''TEST.rsa.pub'' en la máquina remota llamada ''test.example.com'', como usuario ''nr''El archivo cambia de nombre a ''authorized_keys'', que es el nombre del archivo que contiene todas las claves públicas autorizadas para conectarse al servidor.
  
-<note warning>A word of caution heredo not execute the ''scp'' command above if you already have an ''authorized_keys'' file on the remote computerThis will replace the content of the file with your public key!! +<note warning>**Una advertencia**¡no ejecute el comando ''scp'' anterior si ya tiene un archivo de ''authorized_keys'' en la computadora remota¡¡Esto reemplazará el contenido del archivo con su clave pública!! 
-If you already have an ''authorized_keys'' fileexecute a ''cat TEST.rsa.pub >> authorized_keys'' on the remote machine to add your public key at the end of authorized keys.</note>+Si ya tiene un archivo ''authorized_keys'', ejecute un ''cat TEST.rsa.pub >> authorized_keys'' en la máquina remota para agregar su clave pública al final de las claves autorizadas. 
 +</note>
  
-Since all the SSH keys you use should be placed in the ''.ssh'' directorythat's where it goes on the remote machine. +Dado que todas las claves SSH que usa deben colocarse en el directorio ''.ssh'', ahí es donde va en la máquina remota.
- +
-So, are we done? Not really, there is just one small thing to do, but it is truly important, since it is the source of a lot of problems...+
  
 +Entonces, ¿hemos terminado? Realmente no, solo hay una pequeña cosa por hacer, pero es realmente importante, ya que es la fuente de muchos problemas...
 ===== Check the public key permissions on the remote machine ===== ===== Check the public key permissions on the remote machine =====
  
Línea 159: Línea 160:
 <!-- * Original source: [[http://some.website.org/some/page.html]] --> <!-- * Original source: [[http://some.website.org/some/page.html]] -->
 <!-- Authors are allowed to give credit to themselves! --> <!-- Authors are allowed to give credit to themselves! -->
-  * Originally written by [[wiki:user:Noryungi |Noryungi]]+  * Originalmente redactado por [[wiki:user:Noryungi |Noryungi]]
 <!-- * Contrbutions by [[wiki:user:yyy | User Y]] --> <!-- * Contrbutions by [[wiki:user:yyy | User Y]] -->
 +  * Traducción al Español [[wiki:user:antares_alf | antares_alf]] \\
 <!-- Please do not modify anything below, except adding new tags.--> <!-- Please do not modify anything below, except adding new tags.-->
 <!-- You must also remove the tag-word "template" below. Otherwise your page will not show up in the Table of Contents --> <!-- You must also remove the tag-word "template" below. Otherwise your page will not show up in the Table of Contents -->
 {{tag>howtos security ssh sshkeys author_noryungi}} {{tag>howtos security ssh sshkeys author_noryungi}}
 es:howtos:security:sshkeys ()