📜  kulcs másolása távoli gépre - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:30.490000             🧑  作者: Mango

代码示例1
cat ~/.ssh/id_rsa.pub | ssh user@host "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
cat ~/.ssh/id_rsa.pub | ssh user@host "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys" | ssh user@host "chmod 700 ~/.ssh/authorized_keys"