1. Architecture 2. Front 2.1 Free Questions
The public key confirmation prompt pops up when the server is first connected. Causes an automated task to be interrupted due to the initial connection to the server.
The stricthostkeychecking configuration of the SSH client enables the new public key to be automatically received when the server is first connected.
vi /etc/ssh/~]# ssh ip-ouserknownhostsfile=/dev/null - Ostricthostkeychecking=no
3. Script 3.1Server 3.2Master 3.3Agent
Modify the Master,agent property IP in Agent.json
Suppose you want to add
Master 1.1.1.1 instead of 1.1.1.2
Agent 1.1.1.11 Change to 1.1.1.12
#!/bin/Bash
Dos2unix Agent.jsonmaster=1.1.1.1Agent=1.1.1.11 forIpinch$(CatAgent.json |grepIP |sed 's/://g'|awk '{print$2}'|sed 's/"//g'|sed 's/,//g'); Do if[${ip} = =${master}] Then EchoChange Mastersed-I."s/${ip}/$1/g"Agent.jsonelif[${ip} = =${agent}] Then EchoChange agentsed-I."s/${ip}/$2/g"Agent.jsonfi Done
$./ip.sh 1.1.1.2 1.1.1.12
4. Other
Shell Script--03 Instance