安全牛云安全基礎(chǔ)
192.168.1.101:22 ansible_ssh_user=root ansible_ssh_pass=’123456’
SSH密鑰對(duì)認(rèn)證:
[webservers]10.206.240.111:22 ansible_ssh_user=root ansible_ssh_key=/root/.ssh/id_rsa
10.206.240.112:22 ansible_ssh_user=root
也可以ansible.cfg在配置文件中指定:[defaults]private_key_file = /root/.ssh/id_rsa ?# 默認(rèn)路徑
標(biāo)簽: