pública puttygen por llave keygen generar copiar clave authorized_keys autenticación ssh customization

puttygen - ssh-keygen windows



¿Cómo evitar que ssh-keygen use mi nombre de usuario y mi computadora en la clave pública? (2)

Ejecuté ssh-keygen en OS X y cuando mostré la clave pública generada, vi que mi nombre de usuario y de inicio de sesión aparece en la última parte de la clave. ¿Hay alguna forma de que use un valor diferente o no lo use en absoluto?


¡Sí! No es necesario en absoluto, se adjunta de forma arbitraria para que le resulte fácil recordar de dónde vino. Si desea editarlo, solo abra una sesión de Terminal y escriba:

$ nano ~/.ssh/id_rsa.pub

Retire la parte final de la línea (después del doble-igual).


Desde la página de manual ''ssh-keygen (1)'':

For RSA1 keys, there is also a comment field in the key file that is only for convenience to the user to help identify the key. The comment can tell what the key is for, or whatever is useful. The comment is initialized to “user@host” when the key is created, but can be changed using the -c option. … -C comment Provides a new comment. -c Requests changing the comment in the private and public key files. This operation is only supported for RSA1 keys. The program will prompt for the file containing the private keys, for the passphrase if the key has one, and for the new comment.

Por lo tanto, al crear la clave, utilice -C "$desiredcommenttext" para proporcionar el texto de comentario que desee; o para una clave existente, use la opción -c para cambiar el comentario.