2009-05-27 15 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

相关问题