我在OS X上运行ssh-keygen
,当我显示生成的公钥时,我看到我的登录名和机器名出现在密钥的最后部分。有没有办法让它使用不同的价值或根本不使用它?如何让ssh-keygen在公钥中使用我的登录名和计算机名?
18
A
回答
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. 输出域计算机名和登录用户名表格
- 2. Java当前计算机名称和登录用户?
- 3. 如何更改计算机域名而无需登录?
- 4. 我怎样才能在客户端计算机的用户名登录
- 5. 如何使用PHP获取计算机名称,计算机的本地IP和计算机的服务器IP
- 6. 计算引擎不会让我登录
- 7. 如何在log4net中记录计算机环境名称?
- 8. 找到登录指定的计算机名称
- 9. 检索通过AD登录的计算机名称admin帐户
- 10. 登录失败的“域\计算机名” pyodbc与py2exe
- 11. 得到一个人登录到计算机的名称
- 12. 如何让Cygwin在更改后忘记旧计算机名称?
- 13. 如何让一个用户可以从一台计算机登录使用Codeignaiter
- 14. 如何获取计算机名称(在Web应用程序中的主机名)?
- 15. 如何在c#和asp.net中获取客户端主机名,本地计算机名称和用户名
- 16. 审计计算机登录与RSA密钥vs密码
- 17. 更改计算机名称后无法登录SQL服务器
- 18. 登录远程计算机
- 19. 设计与计算/操作的用户名参数登录
- 20. 从webservice中检索客户端用户名和计算机名
- 21. 如何将pgp私钥和公钥转移到另一台计算机上?
- 22. 在不同的计算机上签名与密钥库的apk
- 23. 如何获得本地计算机的计算机名称和IP地址
- 24. iOS:我如何让IAP沙箱忘记错误的登录名?
- 25. ssh公钥登录失败,随机到我的Ubuntu服务器
- 26. 验证用户名和密码的域名或计算机
- 27. 在Windows中检索登录用户的名称和主机名称
- 28. debug1:提供公钥:用户名@主机名
- 29. 如何使用域名替换计算机名称在WCF服务
- 30. 如何使用“用户名或电子邮件”登录设计?
而不是直接黑客的数据文件(这是脆弱的,因为它可以改变),更好地使用官方工具的用户界面用于此目的。 – bignose 2014-05-03 10:04:56