4 ms·
More of a normal tmux question, but is there a way to input the window number, or is there a fast way to open up ssh to 4 servers numbered sequentially? pane 1
by thegagne 7y ago
More of a normal tmux question, but is there a way to input the window number, or is there a fast way to open up ssh to 4 servers numbered sequentially?
pane 1: ssh <server>-1
pane 2: ssh <server>-2
pane 3: ssh <server>-3
pane 4: ssh <server>-4
- emj 7y agoWhen I need to do cluster ssh with tmux I do this or a variant of it: function cluster_ssh() { # Start a pane for every server for server in $*; do tmux split-window ssh $server done; # Same input to all panes tmux setw synchronize-panes on; # Init pane to background, tile layout tmux break-pane -s 0 -d tmux select-layout tiled } bash# cluster_ssh server-{01..10}.example.com EDIT: made it a bit more complete, but you only need split and sync panes IMHO.
- uvatbc 7y agoI like tmuxp: https://github.com/tmux-python/tmuxp/blob/master/README.rst https://github.com/tmux-python/tmuxp/blob/master/README.rst