News for hackers. Stuff that matters.
Re:Little known features of iTerm2 by thegagne on Monday March 02, 2020 @02:27PM (#22467868)
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

Re:Little known features of iTerm2 by emj on Monday March 02, 2020 @03:02PM (#22468308)
When 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.
Re:Little known features of iTerm2 by uvatbc on Wednesday March 04, 2020 @05:23AM (#22482599)