Scp remote replication
Experiment content: use SCP remote copy file to copy hosts file from one host to another host hosts and use DNS parsing
Experimental environment: two hosts, one host A (192.168.195.128) and the other host B (192.168.109.132)
1. Synchronize local files to other servers
Scp local synchronization file path user @ ip: remote server file path
[root@localhost ~] # scp / etc/hosts root@192.168.195.129:/etc/hosts synchronizes the local / etc/hosts file to the / etc/hosts of the server with IP 129
2. Synchronize each other's server files locally
Scp user @ ip: remote server file path local synchronization file path
[root@localhost ~] # scp root@192.168.195.128:/etc/hosts / etc/hosts synchronizes the / etc/hosts file from the server with IP 128to the local / etc/hosts
The scp remote replication experiment is completed.