Skip to content

Instantly share code, notes, and snippets.

@meggi
Created May 28, 2015 14:56
Show Gist options
  • Save meggi/e53869c5dd892bb6e7fa to your computer and use it in GitHub Desktop.
Save meggi/e53869c5dd892bb6e7fa to your computer and use it in GitHub Desktop.
#!/bin/bash
hosts=`cat tmp/server.txt`
# tmux new-window "ssh ${hosts[0]}"
tmux new-window "ssh $hosts"
# unset hosts[0];
for i in $hosts; do
echo "2 Opening sssssession to $i with key $KEY and user $USER..."
tmux split-window -v "/usr/bin/ssh $i"
tmux select-layout tiled > /dev/null
done
tmux select-pane -t 0
tmux set-window-option synchronize-panes on >/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment