Created
July 15, 2025 03:51
-
-
Save muhamad-ridwant-tech/96dff0219dae405184ff3ce48832ad84 to your computer and use it in GitHub Desktop.
Write EoF with SSH Loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ridwan@WarMachine]$ | |
for i in {01,02,03}; do ssh root@MicroCloud-${i} "hostname && lsb_release -d && \ | |
cat <<'EOF' | tee /etc/hosts | |
# Server MicroCloud | |
127.0.0.1 localhost | |
192.168.100.101 MicroCloud-01 | |
192.168.100.102 MicroCloud-02 | |
192.168.100.103 MicroCloud-03 | |
EOF";done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment