Home > Computer Tutorials > Computer Knowledge > Ansible way to connect to the controlled terminal

Ansible way to connect to the controlled terminal

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2024-02-18 16:51:29
forward
1088 people have browsed it

ssh key

# 生成秘钥
ssh-keygen
# 将秘钥拷贝到被管理服务器上
ssh-copy-id-i ~/.ssh/id_rsa.pub -p 22 root@192.168.182.130
Copy after login

account password

1. Command line configuration

# -k:交互式
ansible -uroot -k 192.168.182.130 -m ping
Copy after login

2. Configure in the configuration file

# 默认主机配置文件:/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
Copy after login

Commonly used configuration parameters are as follows:

Ansible way to connect to the controlled terminal

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!

Related labels:
source:mryunwei.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
git - Coding.net ssh setup issue
From 1970-01-01 08:00:00
0
0
0
ssh - git clone and git push errors
From 1970-01-01 08:00:00
0
0
0
git - error when adding ssh key
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template