Last active
January 20, 2019 03:22
-
-
Save masahide/4120b2b678cfbbba98eb1cbab20a6f14 to your computer and use it in GitHub Desktop.
Goで並列ssh実行コマンド gopssh を作った ref: https://qiita.com/yamasaki-masahide/items/2e27eaad9fc4266bb5fd
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
| gopssh <オプション> <コマンド...> |
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
| gopssh -d -h <(echo host1 host2) ls -la /etc/ |
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
| gopssh -k -h hostfile ls -la /etc/ |
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
| gopssh -d -k -h ./hostfile ls -la /etc/ |
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
| tar -cz -C /tmp/ hoge| gopssh -d -h <(host1 host2 host3) -k tar xz -C /tmp/ |
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
| sudo yum install https://github.com/masahide/gopssh/releases/download/v0.5.1/gopssh_amd64.rpm |
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
| wget -qO /tmp/gopssh_amd64.deb https://github.com/masahide/gopssh/releases/download/v0.5.1/gopssh_amd64.deb | |
| sudo dpkg -i /tmp/gopssh_amd64.deb |
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
| brew tap masahide/gopssh https://github.com/masahide/gopssh | |
| brew install gopssh |
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
| host1 | |
| host2:1022 | |
| host3 | |
| . | |
| . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment