2009-05-27 7 views

risposta

23

Dalla pagina man ‘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 “[email protected]” 
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. 

Così, quando si crea la chiave si utilizza -C "$desiredcommenttext" per fornire qualsiasi testo di commento che ti piace; o per una chiave esistente, utilizzare l'opzione -c per modificare il commento.

6

Sì! Non è affatto necessario, è solo arbitrariamente aggiunto per rendere più facile per te ricordare da dove proviene. Se si desidera modificare, basta aprire una sessione di terminale e digitare:

$ nano ~/.ssh/id_rsa.pub 

Rimuovere la parte terminale della linea (dopo il doppio-pari).

+1

Invece di hackerare direttamente il file di dati (che è fragile poiché potrebbe cambiare), meglio usare l'interfaccia utente dello strumento ufficiale per questo scopo. – bignose

+0

@bignose Ciò presupporrebbe conoscere il comando corretto non è vero? – Nuzzolilo