Home > Article > Computer Tutorials > Ansible way to connect to the controlled terminal
# 生成秘钥 ssh-keygen # 将秘钥拷贝到被管理服务器上 ssh-copy-id-i ~/.ssh/id_rsa.pub -p 22 root@192.168.182.130
# -k:交互式 ansible -uroot -k 192.168.182.130 -m ping
# 默认主机配置文件:/etc/ansible/hosts 192.168.182.130 ansible_ssh_user=root ansible_ssh_pass=123456 [web] 192.168.182.130 ansible_ssh_user=root ansible_ssh_pass=123456
Commonly used configuration parameters are as follows:
The above is the detailed content of Ansible way to connect to the controlled terminal. For more information, please follow other related articles on the PHP Chinese website!