Created
June 23, 2017 01:56
-
-
Save kozo2/f24183a5eda705126cf3d005a480581e to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
tmux start-server | |
tmux new-session -d -n tmux-ssh-window -s tmux-ssh | |
for i in $* | |
do | |
tmux split-window -v -t tmux-ssh-window | |
tmux send-keys "ssh $i" C-m | |
tmux select-layout -t tmux-ssh-window main-horizontal | |
done | |
tmux kill-pane -t 0 | |
tmux select-window -t tmux-ssh-window | |
tmux select-pane -t 0 | |
tmux select-layout -t tmux-ssh-window main-horizontal | |
tmux set-window-option synchronize-panes on | |
tmux attach-session -t tmux-ssh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment