ssh-keygen (直接回车即可)
推送公钥
for i in {ip}; do ssh-copy-id -i $i; done
cat /etc/ansible/hosts
如果端口不是22
ssh-copy-id -i ~/.ssh/id_rsa.pub "-p 10022 user@server"
ansible秘钥认证
最新推荐文章于 2024-06-26 16:12:42 发布
ssh-keygen (直接回车即可)
推送公钥
for i in {ip}; do ssh-copy-id -i $i; done
cat /etc/ansible/hosts
如果端口不是22
ssh-copy-id -i ~/.ssh/id_rsa.pub "-p 10022 user@server"