Get the App
SLTechnology News&Howtos  ›  Network Security  › 

A script for remote replication

Shulou Source: shulou.com Published: 2022-06-01 06:39:13 10月03日 Update

There is a requirement that there are N servers, each with a different port.

For example, 1.1.1.1purl 22

2.2.2.2:33

3.3.3.3:55

……

All servers are made secret-free login.

First, write a file to write the ip and the corresponding port, such as: vim scp.log1.1.1.1:222.2.2.2:333.3.3.3:55. Vim scp.shroudanbinandbashhands authorizationgyu (Email:348450594@qq.com) # this is a scp.shwhile read line do for i in $line do touch / tmp/scp.txt echo $I > / tmp/scp.txt Scp / tmp/a.txt-P `awk-F:'{print $NF}'/ tmp/ scp.txt` root@ `awk-F:'{print $1}'/ tmp/ scp.txt`: / tmp/ echo > / tmp/scp.txt done done < / tmp/scp.log

Tags: Server service port file login script Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Microsoft NVidia Xiaomi Docker