如何在同一台服务器上使用两个ssh

时间:2016-04-29 11:30:06

标签: ssh server

我有ssh,我已将它添加到服务器和git。但我也想在同一台服务器上添加另一个ssh密钥。这可能吗,怎么做?感谢。

2 个答案:

答案 0 :(得分:1)

You can add as many new keys as you want simply adding new lines in the .ssh/authorized_keys file with the public keys.

答案 1 :(得分:1)

如上所述,您需要向.ssh/authorized_keys添加其他公钥。也就是说,密码需要与您正在使用的密钥相对应。您可以像这样指定此键:ssh -i /path/to/chosen/key user@server。有关详细信息/示例,请参阅this answer

相关问题