Created
February 18, 2016 14:10
-
-
Save mannih/1ca4977f633b73237315 to your computer and use it in GitHub Desktop.
multissh with tmux
This file contains 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
multissh() { | |
local hosts=( $* ) | |
local win=$( tmux new-window -dP "ssh ${hosts[0]}" ) | |
unset hosts[0] | |
for i in "${hosts[@]}"; do | |
tmux split-window -ht$win "ssh $i" | |
tmux select-layout -t$win tiled > /dev/null | |
done | |
tmux select-pane -t $win | |
tmux set-window-option -t $win synchronize-panes on > /dev/null | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment