bulk-ssh
v1.0.0
Published
Execute commands on multiple remote servers using SSH
Downloads
2
Readme
#BSSH (🐝SSH)
Bulk SSH is a CLI for executing remote commands via SSH on multiple servers.
Usage: bssh [options] "<command to execute remotely>"
|Options|Description| |:---|:---| | -V, --version | output the version number| | -f, --file [filepath] | What file contains the SSH commands to run the command with?| | -i, --identity [identity_file]| The path to your keypair file| | -s, --synchronous | Just run everything and let results come back in live. More difficult to read results, but more efficient to run commands.| | -u, --user [username] | The username you wish to use| | -h, --help | output usage information|
Example
In certain circumstances you just want to go directly to a specific docker instance (say to get to a shell within it)
Rather than:
ssh -i somekey.key [email protected]
sudo docker service ls
sudo docker service ps k28s53gd52fd
exit
ssh -i another.key [email protected]
sudo docker exec -it 781nd7s5g2s ash
Use BSSH
bssh -f ./production-server-list -i somecommon.key -u ubuntu "sudo docker ps"
ssh -i somecommon.key [email protected]
sudo docker exec -it 781nd7s5g2s ash
If you have an SSH config set up it is even simpler as you can cut out the key and user:
bssh -f ./production-server-list "sudo docker ps"
ssh -i somecommon.key [email protected]
sudo docker exec -it 781nd7s5g2s ash