App-ClusterSSH
view release on metacpan or search on metacpan
NAME
cssh - Cluster administration tool
VERSION
This documentation is for version: 4.13.2
SYNOPSIS
cssh [-a '<command>'] [-K <seconds>] [-q] [-c '<filename>'] [-x <cols>]
[-C '<filename>'] [--debug [[...] || <INTEGER>]] [-d] [-e
'<[user@]<host>[:port]>'] [--fillscreen] [-f '<font>'] [-h] [-L '[tag]']
[-H] [-o '<STRING>'] [-p <port>] [-Q] [-y <rows>] [-s] [-r '<filename>']
[-t '<STRING>'] [-g] [-T '<title>'] [-u] [-?] [-A] [-l '<username>']
[-v]
DESCRIPTION
The command opens an administration console and an xterm to all
specified hosts. Any text typed into the administration console is
replicated to all windows. All windows may also be typed into directly.
This tool is intended for (but not limited to) cluster administration
where the same configuration or commands must be run on each node within
the cluster. Performing these commands all at once via this tool ensures
all nodes are kept in sync.
Connections are opened using ssh which must be correctly installed and
configured.
Extra caution should be taken when editing files as lines may not
necessarily be in the same order; assuming line 5 is the same across all
servers and modifying that is dangerous. It's better to search for the
specific line to be changed and double-check all terminals are as
expected before changes are committed.
Further Notes
Please also see "KNOWN BUGS".
* The dotted line on any sub-menu is a tear-off, i.e. click on it and
the sub-menu is turned into its own window.
* Unchecking a hostname on the Hosts sub-menu will unplug the host
from the cluster control window, so any text typed into the console
is not sent to that host. Re-selecting it will plug it back in.
* If your window manager menu bars are obscured by terminal windows
see the "screen_reserve_XXXXX" options in the
$HOME/.clusterssh/config file (see "FILES").
* If the terminals overlap too much see the "terminal_reserve_XXXXX"
options in the $HOME/.clusterssh/config file (see "FILES").
* When using ClusterSSH on a large number of systems to connect to a
single system using an SSH utility (e.g. you issue a command to to
copy a file using scp from the remote computers to a single host)
and when these connections require authentication (i.e. you are
going to authenticate with a password), the sshd daemon at that
location may refuse connections after the number "MaxStartups" limit
in sshd_config is exceeded. (If this value is not set, it defaults
to 10). This is expected behavior; sshd uses this mechanism to
prevent DoS attacks from unauthenticated sources. Please tune
sshd_config and reload the SSH daemon, or consider using the
~/.ssh/authorized_keys mechanism for authentication if you encounter
this problem.
* If client windows fail to open, try running:
"cssh -e {single host name}"
This will test the mechanisms used to open windows to hosts. This
could be due to either the "-xrm" terminal option which enables
"AllowSendEvents" (some terminals do not require this option, other
terminals have another method for enabling it - see your terminal
documentation) or the configuration of "ssh".
OPTIONS
Some of these options may also be defined within the configuration file.
Default options are shown as appropriate.
--action '<command>', -a '<command>'
Run the command in each session, e.g. "-a 'vi /etc/hosts'" to drop
straight into a vi session.
--autoclose <seconds>, -K <seconds>
Number of seconds to wait before closing finished terminal windows.
--autoquit, -q
Toggle automatically quiting after the last client window has closed
(overriding the config file).
--cluster-file '<filename>', -c '<filename>'
Use supplied file as additional cluster file (see also "FILES").
--cols <cols>, -x <cols>
Number of columns
--config-file '<filename>', -C '<filename>'
Use supplied file as additional configuration file (see also
"FILES").
--debug [[...] || <INTEGER>]
Enable debugging. Either a level can be provided or the option can
be repeated multiple times. Maximum level is 9.
--dump-config, -d
Dump the current configuration in the same format used by the
$HOME/.clusterssh/config file.
--evaluate '<[user@]<host>[:port]>', -e '<[user@]<host>[:port]>'
Display and evaluate the terminal and connection arguments to
display any potential errors. The <hostname> is required to aid the
evaluation.
--fillscreen
Resize terminal windows to fill the whole available screen
--font '<font>', -f '<font>'
Specify the font to use in the terminal windows. Use standard X font
notation such as "5x8".
--help, -h
Show basic help text and exit
--list '[tag]', -L '[tag]'
List available cluster tags. Tag is optional. If a tag is provided
then hosts for that tag are listed. NOTE: format of output changes
when using "--quiet" or "-Q" option.
--man, -H
Show full help text (the man page) and exit
--options '<STRING>', -o '<STRING>'
Specify arguments to be passed to ssh when making the connection.
NOTE: options for ssh should normally be put into the ssh
configuration file; see "ssh_config" and $HOME/.ssh/config for more
details.
Default: -x -o ConnectTimeout=10
--port <port>, -p <port>
Specify an alternate port for connections.
--quiet, -Q
Do not output extra text when using some options
--rows <rows>, -y <rows>
Number of rows
--show-history, -s
Show history within console window.
--tag-file '<filename>', -r '<filename>'
Use supplied file as additional tag file (see also "FILES")
--term-args '<STRING>', -t '<STRING>'
Specify arguments to be passed to terminals being used.
--tile, -g
Toggle window tiling (overriding the config file).
--title '<title>', -T '<title>'
Specify the initial part of the title used in the console and client
windows.
--unique-servers, -u
Toggle connecting to each host only once when a hostname has been
specified multiple times.
--usage, -?
Show synopsis and exit
--use-all-a-records, -A
If a hostname resolves to multiple IP addresses, toggle whether or
not to connect to all of them, or just the first one (see also
config file entry).
--username '<username>', -l '<username>'
Specify the default username to use for connections (if different
before scrollbars are used
max_host_menu_items = 30
Maximum number of hosts to put into the host menu before
starting a new column
menu_host_autotearoff = 0
menu_send_autotearoff = 0
When set to non-0 will automatically tear-off the host or send
menu at program start
mouse_paste = Button-2 (middle mouse button)
Default key sequence to paste text into the console window using
the mouse. See "KEY SHORTCUTS" for more information.
rsh = /path/to/rsh
ssh = /path/to/ssh
telnet = /path/to/telnet
Set the path to the specific binary to use for the communication
method, else uses the first match found in $PATH
rsh_args = <blank>
ssh_args = "-x -o ConnectTimeout=10"
telnet_args = <blank>
Sets any arguments to be used with the communication method
(defaults to ssh arguments).
NOTE: The given defaults are based on OpenSSH, not commercial
ssh software.
NOTE: Any "generic" change to the method (e.g., specifying the
ssh port to use) should be done in the medium's own config file
(see "ssh_config" and $HOME/.ssh/config).
screen_reserve_top = 0
screen_reserve_bottom = 60
screen_reserve_left = 0
screen_reserve_right = 0
Number of pixels from the screen's side to reserve when
calculating screen geometry for tiling. Setting this to
something like 50 will help keep cssh from positioning windows
over your window manager's menu bar if it draws one at that side
of the screen.
terminal = /path/to/xterm
Path to the X-Windows terminal used for the client.
terminal_args = <blank>
Arguments to use when opening terminal windows. Otherwise takes
defaults from $HOME/.Xdefaults or $HOME/.Xresources file.
terminal_chdir = 0
When non-0, set the working directory for each terminal as per
'terminal_chdir_path'
terminal_chdir_path = $HOME/.clusterssh/work/%s
Path to use as working directory for each terminal when
'terminal_chdir' is enabled. The path provided is passed through
the macro parser (see the section above on 'macros_enabled'.
terminal_font = 6x13
Font to use in the terminal windows. Use standard X font
notation.
terminal_reserve_top = 5
terminal_reserve_bottom = 0
terminal_reserve_left = 5
terminal_reserve_right = 0
Number of pixels from the terminal's side to reserve when
calculating screen geometry for tiling. Setting these will help
keep cssh from positioning windows over your scroll and title
bars or otherwise overlapping the windows too much.
terminal_colorize = 1
If set to 1 (the default), then "-bg" and "-fg" arguments will
be added to the terminal invocation command-line. The terminal
will be colored in a pseudo-random way based on the host name;
while the color of a terminal is not easily predicted, it will
always be the same color for a given host name. After a while,
you will recognize hosts by their characteristic terminal color.
terminal_bg_style = dark
If set to "dark", the terminal background will be set to black
and the foreground to the pseudo-random color. If set to
"light", then the foreground will be black and the background
the pseudo-random color. If terminal_colorize is "zero", then
this option has no effect.
terminal_size = 80x24
Initial size of terminals to use. NOTE: the number of lines (24)
will be decreased when resizing terminals for tiling, not the
number of characters (80).
terminal_title_opt = -T
Option used with "terminal" to set the title of the window
terminal_allow_send_events = -xrm '*.VT100.allowSendEvents:true'
Option required by the terminal to allow XSendEvents to be
received
title = cssh
Title of windows to use for both the console and terminals.
unmap_on_redraw = no
Tell Tk to use the UnmapWindow request before redrawing terminal
windows. This defaults to "no" as it causes some problems with
the FVWM window manager. If you are experiencing problems with
redraws, you can set it to "yes" to allow the window to be
unmapped before it is repositioned.
use_all_a_records = 0
If a hostname resolves to multiple IP addresses, set to 1 to
connect to all of them, not just the first one found. See also
"--use-all-a-records"}
use_hotkeys = 1
Setting to 0 will disable all hotkeys.
use_natural_sort = 0
Windows will normally sort in alphabetical order, i.e.: host1,
host11, host2. Setting to this 1 will change the sort order,
i.e.: host1, host2, host11. NOTE: You must have the perl module
( run in 2.679 seconds using v1.01-cache-2.11-cpan-97f6503c9c8 )