Last active

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Simple shell script that wraps tmux to simulate clusterssh behaviour, while not needing X and having all the advantages of tmux. Run as: ./uberssh.sh my_session_name host1 host2 host3To toggle between input synchronization, use "ctrl+b u".

View uberssh.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/bin/bash
TMUX_PATH="/usr/bin/tmux"
SESS_NAME="$1"
shift
 
HOSTS="$*"
let ctr=0
for h in $HOSTS; do
if [ $ctr -eq 0 ]; then
$TMUX_PATH new-session -d -s $SESS_NAME "ssh $h"
else
$TMUX_PATH splitw -t $SESS_NAME:0 "ssh $h"
$TMUX_PATH select-layout -t $SESS_NAME:0 tiled
fi
let ctr=ctr+1
done
$TMUX_PATH set-window-option -t $SESS_NAME:0 synchronize-panes on
$TMUX_PATH select-pane -t $SESS_NAME:0
$TMUX_PATH bind-key u set-window-option synchronize-panes
$TMUX_PATH attach -t $SESS_NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.