NAME

tssh - tmux cluster ssh

SYNOPSIS

 tssh [-w number] [-f] [-v] [-h] [-p] [-d delay_time] [-c remote_cmd] [-o ssh_option] <host1> <host2> <clusterssh class>... <hostM>- <hostN>+

DESCRIPTION

tssh can be use to launch terminal on many computer in parallel with tmux multiplexer and ssh. The tmux windows is splitted automatically. If you need more computers on the same windows, you can zoom in and out under gnome terminal with Ctrl- or Ctrl+. This must be done before launching tssh.

On the command line, you can put host, login@host, clusterssh class. A host or a class can be remove from the list with a dash append and force to be in this one with a plus append.

See some Example below.

The control command for tmux is Ctrl^b. You can switch from broadcast to a local machine with Ctrl^b Ctrl^b and move between machine with Ctrl^b ArrowKey.

OPTIONS

-w number

Windows to open (integer, default 16)

-o ssh_option

Option to pass to ssh

-f

Fast, no nmap scan to eliminate sleeping computer

-d delay_time

When use tmux context, add a small delay in second before lauching the second shell to let tmux the time to open the window (default 0.8).

-c remote_cmd

Launch the remote command on hosts and exit

-p

Launch in parallel (only with option -c) with command parallel or xargs

-v

Verbose

-h

Minimal help

CONFIGURATION

The clusterssh config file ~/.csshrc is a key values file. The "clusters" is mandatory for clusterssh (not tssh) and define the other keys. Values could be computer list or other key...

 clusters = all server s1 s2 s3 node n1 n2 team switch
 all = server node team
 server = s1 s2
 node = n1 n2
 s1 = srv-mail srv-dns srv-imap
 s2 = srv-web srv-proxy
 n1 = node001 node002 node003 node004
 n2 = node101 node102 node103 node104
 team = pc01 pc06 laptop04 laptop05 laptop09
 switch = root@switch01 root@switch05 root@switch17

The tssh config file (~/.config/tssh/config.sh) can be use change the default parameters.

 #export delay_time=0.8
 #export split_number=16
 export dyn_domain='mycompagny.local'
 #export ssh_option=''
 #export fast='yes'
 #export verbose='yes'

delay_time

See option -d.

split_number

See option -w.

dyn_domain

If computer doesn't respond on it's normal IP, search also to connect on it with this DNS domain. Could be use with DNS dynamic domain where computer register inside automatically.

ssh_option

See option -o.

fast

See option -f.

verbose

See option -v.

EXAMPLES

DEPENDS

On Debian, you need the package

 apt-get install tmux ncurses-bin wamerican nmap

wamerican (or wfrench...) is used to choose a random word in the file /usr/share/dict/words for each new tmux session.

ncurses-bin is required for the tput command to automatically split your terminal into several small panels. nmap is only used for dynamic DNS domain and dynamic scan. This is not mandatory for general use.

By default, tssh use tput to know the number of columns and lines of your terminal. It takes 10 lines and 40 columns for each windows by default. If tput is not installed, the default is 16 windows...

SEE ALSO

cluster-ssh, cssh, xargs, parallel, tmux

Own project ressources:

AUTHORS

Written by Gabriel Moreau, Grenoble - France

COPYRIGHT

Copyright (C) 2014-2019, LEGI UMR 5519 / CNRS UGA G-INP, Grenoble, France Licence : GNU GPL version 2 or later