Skip to content

Instantly share code, notes, and snippets.

@kozo2
Created June 23, 2017 01:56
Show Gist options
  • Save kozo2/f24183a5eda705126cf3d005a480581e to your computer and use it in GitHub Desktop.
Save kozo2/f24183a5eda705126cf3d005a480581e to your computer and use it in GitHub Desktop.
#!/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