Mic*_*el 4 ubuntu ssh ssh-keys
我刚刚第一次创建了一个虚拟服务器(或者,用 Digital Ocean 主机的语言来说,一个“小滴”)。Digital Ocean 有一个关于 SSH 密钥的说明页面https://www.digitalocean.com/ssh_keys 告诉我们检查 SSH 密钥是否存在,然后它给出了生成新 SSH 密钥然后添加它们的说明。就我而言,使用说明给出的命令,我发现我已经有了 SSH 密钥(我猜是我在注册 github 或 heroku 时生成的)
问题
1) 我应该重用我已经拥有的 SSH 密钥还是生成新的密钥(即它们必须是我使用它们的服务所独有的)?
2) 说明(复制如下)讲的是将 SSH 密钥添加到数字海洋,然后创建服务器。就我而言,我在添加 SSH 密钥之前创建了服务器。这会产生任何我应该注意的问题吗?我应该销毁服务器(还没有安装任何东西)并在适当的时候创建一个添加 SSH 密钥的新服务器吗?
指示
You can add SSH keys to DigitalOcean which can then be selected during the droplet create process to add the selected SSH keys under the root user.
When using SSH keys a root password will no longer be set as SSH keys will be used as the preferred method of access.
We do not manage the server after creation, so editing, adding, or removing SSH keys from the SSH interface will not affect any of the stored keys on droplets that you have created.
Run Code Online (Sandbox Code Playgroud)
SSH 密钥不必对特定服务唯一。作为良好的一般做法,它们应该是唯一的。
例如,您作为一个人可能有多个 SSH 密钥:
- 个人系统
的密钥
-工作系统的密钥 - 与 github/rsync.net/etc 一起使用的密钥。
在工作中,您可能还拥有专用于特定程序的密钥(一个由 Puppet 使用,一个由备份软件使用,等等)
您应该考虑您的安全和保密需求,然后确定是应该创建新密钥还是使用现有密钥。
您粘贴的说明似乎表明,当您创建“小滴”Digital Ocean 时,会将指定的键添加到 root 的authorized_keys文件中。之后他们不再管理authorized_keys文件,因此如果您已经创建了一个没有指定密钥的服务器(或者您想稍后添加/更改/删除密钥),您将需要手动编辑 root 的authorized_keys文件以进行这些更改。
您不需要为此销毁/重新创建服务器。
| 归档时间: |
|
| 查看次数: |
186 次 |
| 最近记录: |