📅  最后修改于: 2022-03-11 14:59:30.490000             🧑  作者: Mango
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"