2009-05-27 14 views

回答

23

的手冊頁「SSH-凱基(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. 

因此,創建密鑰,當您使用-C "$desiredcommenttext"提供任何您喜歡的註釋文本;或對於現有密鑰,請使用-c選項更改註釋。

6

是的!它根本不需要,它只是隨便附加的,以便您輕鬆記住它來自哪裏。如果要編輯它,只需打開終端會話並輸入:

$ nano ~/.ssh/id_rsa.pub 

刪除行的末尾部分(在double-equals之後)。

+1

而不是直接黑客的數據文件(這是脆弱的,因爲它可以改變),更好地使用官方工具的用戶界面用於此目的。 – bignose 2014-05-03 10:04:56

相關問題