ssh-copy-id 会覆盖以前的密钥吗?

rya*_*ter -1 ssh ssh-keys

我还没有使用谷歌找到任何明确的答案。

似乎答案是否定的,但在我继续之前我需要确定。

ssh-copy-id将密钥附加到authorized_keys还是覆盖以前的密钥?

谢谢。

附录:

所以答案就在手册页中。去搞清楚。

我想这个问题至少可以帮助像我这样有点太习惯于谷歌搜索和寻找教程的谷歌骑师(通常用外行的术语为我们这些一生只使用 Windows 的穷人解释事情)。

小智 7

man ssh-copy-id 说:

By default it adds the keys by appending them to the remote
user's ~/.ssh/authorized_keys (creating the file, and directory, if necessary).
Run Code Online (Sandbox Code Playgroud)