2009-05-27 15 views

Odpowiedz

23

Z podręcznika „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. 

Tak, podczas tworzenia klucza użyć -C "$desiredcommenttext" zapewnić cokolwiek tekst komentarza chcesz; lub dla istniejącego klucza, użyj opcji -c, aby zmienić komentarz.

6

Tak! Nie jest to wcale potrzebne, jest po prostu dowolnie dołączane, aby ułatwić zapamiętanie skąd pochodzi. Jeśli chcesz go zmieniać, wystarczy otworzyć sesję terminal i wpisz:

$ nano ~/.ssh/id_rsa.pub 

Zdjąć część końcowy linii (po podwójnych równymi).

+1

Zamiast bezpośrednio hakować plik danych (który jest delikatny, ponieważ może się zmienić), lepiej użyć do tego celu interfejsu użytkownika oficjalnego narzędzia. – bignose

+0

@bignose Zakłada się, że znając właściwą komendę, nie? – Nuzzolilo

Powiązane problemy