Skip to content

Instantly share code, notes, and snippets.

@tuanphpvn
Forked from nsa-yoda/ssh.sh
Created October 13, 2017 08:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuanphpvn/c51ff45ceb01e235a2f3fa11362eb93f to your computer and use it in GitHub Desktop.
Save tuanphpvn/c51ff45ceb01e235a2f3fa11362eb93f to your computer and use it in GitHub Desktop.
Small bash script to open multiple terminal windows and auto SSH to several servers
#!/bin/bash
# Dependencies: gnome, sshpass, ssh, gui
gnome-terminal --maximize --tab --title='Hades' --command 'sshpass -p "afsd@#$5u89f" ssh root@192.168.0.125' \
--tab --title='Kronos' --command 'sshpass -p "sad;fi@#$0al" ssh root@192.168.0.126' \
--tab --title='Zeus' --command 'sshpass -p "afsd@#$5u89f" ssh root@192.168.0.127' \
--tab --title='Midas' --command 'sshpass -p "sad;fi@#$0al" ssh root@192.168.0.128' \
--tab --title='Thor' --command 'sshpass -p "afsd@#$5u89f" ssh root@192.168.0.129' \
--tab --title='Herc' --command 'sshpass -p "sad;fi@#$0al" ssh root@192.168.0.130'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment