tssh - tmux cluster ssh

NAME

tssh - tmux cluster ssh

SYNOPSIS

tssh [--window|-w number] [--fast|-f] [--help|-h] [--version|-V] [--parallel|-p] [--ping|-i] [--telnet|-t] [--print|-P] [--verbose|-v] [--log|-l log_file] [--delay|-d delay_time] [--command|-c remote_cmd] [--ssh-option|-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 "EXAMPLES" 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

--window|-w number

Number of windows to open per panel (integer, default 16).

--ssh-option|-o ssh_option

Option to pass to ssh

--fast|-f

Fast, no map is done in order to scan and eliminate sleeping computer.

--delay|-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).

--command|-c remote_cmd

Launch the remote command on hosts and exit.

--parallel|-p

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

--ping|-i

No ssh, just ping host.

--telnet|-t

Use telnet instead of ssh.

Print the list of host. This command is pretty equivalent to:

tssh -p -c 'echo ${HOSTNAME}'

--verbose|-v

Verbose.

--log|-l log_file

Like verbose but append message in the log_file.

--help|-h

Minimal help.

--version|-V

Print software version.

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 ssh_port=22
#export fast='yes'
#export verbose='yes'

delay_time

See option -d above.

split_number

See option -w above.

dyn_domain

If the computer does not respond on its normal IP, tssh will also try to connect to this machine with this DNS domain extension. This option can be used with a dynamic DNS domain in which the computer is automatically registered. This is for example the case with an Active Directory.

ssh_option

See option -o above.

fast

See option -f above.

verbose

See option -v above.

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.

When it starts, tssh uses tput to find out the number of columns and rows in your terminal. By default, it takes 10 rows and 40 columns for each window. If tput is not installed, the stty command is used with the size option...

SEE ALSO

cluster-ssh, cssh, xargs, parallel, tmux

Own project ressources:

Note: The master Git repository in on the GRICAD Gitlab. Other Git repository are mirror or fork.

AUTHORS

Written by Gabriel Moreau, Grenoble - France

COPYRIGHT

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

 tssh - tmux cluster ssh