Ambos lados, revisión anteriorRevisión previa | Próxima revisiónAmbos lados, revisión siguiente |
es:howtos:security:sshkeys [2019/06/15 01:52 (UTC)] – antares_alf | es:howtos:security:sshkeys [2020/03/21 03:40 (UTC)] – [Create the public/private key pair] antares_alf |
---|
| |
| |
===== 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 claves, utilizando los valores predeterminados. Aquí hay un pequeño ejemplo: |
To create a public and a private key, use the OpenSSH ''ssh-keygen'' utility. This will automatically generate a key pair, using the default values. Here is a small example: | |
| |
<code> | <code> |
</code> | </code> |
| |
OK, what is going on here? | OK, ¿qué está pasando aquí? |
First, ''ssh-keygen'' is going to generate a key pair. So far, so good, please 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 options, and there are many of them. | Primero, ''ssh-keygen'' generará un par de claves. Hasta ahora, todo bien, asegú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 opciones, y hay muchas de ellas. |
| |
| 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 utilizado. Hay tres tipos de cifrado posibles: DSA, RSA y ECDSA. Cuál es el mejor se deja como ejercicio para el lector ... ;-) |
| |
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 used. There are three such encryption possible: DSA, RSA and ECDSA. Which one is the best is left as an exercice for the reader... ;-) | Luego le preguntará dónde guardar la clave. Aquí se ingresa ''TEST.rsa'', ya que hay otras claves en el sistema. Es importante dar un nombre propio a la clave, ya que hace que sea mucho más fácil recordar a qué se conecta cada clave. |
| |
It is then going to ask you where to save the key. Here, ''TEST.rsa'' is entered, since there are other keys on the system. Giving a proper name to the key is important, since it makes it much easier to remember which key connects to what. | Por ejemplo, si 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í. |
| |
For instance, if 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. | A continuación, ''ssh-keygen'' le pide una frase de contraseña. ¡Siempre es una buena idea ingresar una frase de contraseña! Esto le permite proteger su clave privada, incluso si cae en las manos equivocadas. Si 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í. |
| |
Next, ''ssh-keygen'' asks you for a passphrase. It is always a good idea to enter a passphrase! This allows you to protect your private key, even if it falls into the wrong hands. If 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. | |
| |
The rest are just informative messages, and you will note that the key pair has been saved as follows: | El resto son solo mensajes informativos, y notará que el par de claves se ha guardado de la siguiente manera: |
| |
- The private key is named ''TEST.rsa''. | - La clave privada se llama ''TEST.rsa''. |
- The public key - the one you want to copy on the remote machine - is named ''TEST.rsa.pub'' | - La clave pública, la que desea copiar en la máquina remota, se llama ''TEST.rsa.pub'' |
| |
Congratulations! You are halfway there! | ¡Felicidades! Estás a medio camino! |
| |
===== Configure your public key on the remote computer ===== | ===== Configure your public key on the remote computer ===== |