如果其他用户没有 SSH 密钥,我该如何授予他们访问权限?

How do I give access to other users if they don't have SSH keys?

我是设置 VPS (DigitalOcean droplets 的新手),建议设置 SSH 密钥而不是使用用户名和密码登录。我已成功将 SSH 密钥添加到我的 VPS,但我不是此 VPS 的唯一用户,否则我将使用另一台计算机。我不确定传递私钥是否是个好主意。

  • 其他人可以使用那台机器的username/password访问droplet(DigitalOcean droplet)。

  • 或者,您可以从一台机器登录 (SSH already added)。现在在 DigitalOcean 液滴的 ~/.ssh/known_hosts 文件中添加一个 new ssh-key

每个液滴都有一个默认 root/password。您可以使用 DigitalOcean GUI 重置 root password重置根密码):

I will be using another computer. I am not sure if it's a good idea to pass around private keys.

不,移动密钥不是一个好主意(除非它们存储在安全硬件 -- HSM 上)。否则,最好在您计划使用的计算机上创建单独的密钥(加密)并将它们添加到 VPS。然后你可以简单地撤销那个,如果他们可能受到威胁并避免交换所有计算机上的所有密钥。