Ansible 配置公私钥
- 生成私钥:
bash
ssh-keygen
- 向主机分发私钥:
bash
ssh-copy-id -i /root/.ssh/id_rsa.pub cloudos@172.16.0.54
报错
-bash: ssh-copy-id: command not found
解决办法:
bash
yum -y install openssh-clientsansible