NAME
cssh (crsh) - Cluster administration tool
SYNOPSIS
cssh [options] [[user@]<server>|<tag>] [...]
crsh [options] [[user@]<server>|<tag>] [...]
cssh [options] [[user@]<server>[:port]|<tag>] [...]
crsh [options] [[user@]<server>[:port]|<tag>] [...]
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 via ssh so a correctly installed and
configured ssh installation is required. If, however, the program
is called by ``crsh'' then the rsh protocol is used (and the
communications channel is insecure).
Extra caution should be taken when editing system files such as
/etc/inet/hosts as lines may not necessarily be in the same order.
Assuming line 5 is the same across all servers and modifying that
is dangerous. Better to search for the specific line to be changed
and double-check before changes are committed.
Further Notes
- *
- 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 the code is called as crsh instead of cssh (i.e. a symlink
called crsh points to the cssh file or the file is renamed) rsh is
used as the communications protocol instead of ssh.
- *
- Starting the utility will be much faster with a configuration
file (as this prevents searching for required files). Generate one
containing all default entries with:
"cssh -u > $HOME/.csshrc"
- *
- When using cssh on a large number of systems to connect back to
a single system (e.g. you issue a command to the cluster to scp a
file from a given location) and when these connections require
authentication (i.e. you are going to authenticate with a
password), the sshd daemon at that location may refuse connects
after the number specified by MaxStartups 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 -d
<single host name>''. This will output a command to run which
will test the method used by cssh to open client windows. If you
copy-and-paste this command into a window and it fails, this is the
issue. It is most likely due to the ``-xrm'' option which enables
``AllowSendEvents'' in the terminal. Some terminal do not require
this option, other terminals have another method for enabling it.
See your terminal documention for further information.
OPTIONS
Some of these options may also
be defined within the configuration file. Default options are shown
as appropriate.
- -h|-?
- Show basic help text, and exit
- -H
- Show full help test (the man page), and
exit
- -v
- Show version information and exit
- -d
- Enable basic debugging mode (can be
combined with -D)
- -D
- Enable extended debugging mode (can be
combined with -d)
- -q|-Q
- Enable|Disable automatically quiting after
the last client window has closed (overriding the config file)
- -u
- Output configuration in the format used by
the $HOME/.csshrc file
- -g|-G
- Enable|Disable window tiling (overriding
the config file)
- -c <file>
- Use supplied file as additional cluster
file (see also ``FILES'')
- -l $LOGNAME
- Specify the default username to use for
connections (if different from the currently logged in user).
NOTE: will be overridden by
<user>@<host>
- -T CSSH
- Specify the initial part of the title used
- Specify the initial part of the title used
in the console and client windows
- -o -x -o ConnectTimeout=10 - for ssh connections
-
- -o - for rsh connections
- Specify arguments to be passed to ssh or
rsh when making the connection.
NOTE: any ``generic'' change to the
method (i.e. specifying the ssh port to use) should be done in the
medium's own config file (see ssh_config and
$HOME/.ssh/config).
- -t
- Specify arguments to be passed to
terminals being used
- -i
- Ignore errors from unresolvable host names
(i.e. because the name is an alias within an ssh config file or
similar) (see also ``ignore_host_errors'' in ``FILES'')
- -e [user@]<hostname>[:port]
- Display and evaluate the terminal and
connection arguments so display any potential errors. The
<hostname> is required to aid the evaluation.
ARGUMENTS
The following arguments are
support:
- [user@]<hostname>[:port] ...
- Open an xterm to the given hostname and
connect to the administration console. An optional port number can
be used if sshd is not listening on standard port (e.g not
listening on port 22) and ssh_config cannot be used.
- <tag> ...
- Open a series of xterms defined by
<tag> within either /etc/clusters or $HOME/.csshrc
(see ``FILES'').
KEY SHORTCUTS
The following key
shortcuts are available within the console window, and all of them
may be changed via the configuration files.
- Control-q
- Quit the program and close all connections
and windows
- Control-+
- Open the Add Host dialogue box
- Alt-n
- Paste in the correct client name to all
clients, i.e.
"scp /etc/hosts server:files/<Alt-n>.hosts"
would replace the <Alt-n> with the client's name in all
the client windows
- Alt-r
- Retile all the client windows
FILES
- /etc/clusters
- This file contains a list of tags to
server names mappings. When any name is used on the command line it
is checked to see if it is a tag in /etc/clusters (or the .csshrc
file, or any additional cluster file specified by -c). If it is a
tag, then the tag is replaced with the list of servers from the
file. The file is formated as follows:
<tag> [user@]<server> [user@]<server> [...]
i.e.
# List of servers in live
live admin1@server1 admin2@server2 server3 server4
All standard comments and blank lines are ignored. Tags may be
nested, but be aware of recursive tags.
Clusters may also be specified within the user's .csshrc file,
as documented below.
- /etc/csshrc & $HOME/.csshrc
- This file contains configuration overrides
- the defaults are as marked. Default options are overwritten first
by the global file, and then by the user file.
-
- always_tile = yes
- Setting to anything other than
"yes" does not perform window tiling (see also -G).
- auto_quit = yes
- Automatically quit after the last client
window closes. Set to anything other than ``yes'' to disable. Can
be overridden by "-Q" on the command line.
- comms = ssh
- Sets the default communication method
(initially taken from the name of program, but can be overridden
here).
- clusters = <blank>
- Define a number of cluster tags in
addition to (or to replace) tags defined in the
/etc/clusters file. The format is:
clusters = <tag1> <tag2> <tag3>
<tag1> = host1 host2 host3
<tag2> = user@host4 user@host5 host6
<tag3> = <tag1> <tag2>
As with the /etc/clusters file, be sure not to create
recursivly nested tags.
- console_position = <null>
- Set the initial position of the console -
if empty then let the window manager decide. Format is
'+<x>+<y>', i.e. '+0+0' is top left hand corner of the
screen, '+0-70' is bottom left hand side of screen (more or less).
- ssh_args = -x -o ConnectTimeout=10
-
- rsh_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 (i.e. specifying the ssh port to use) should be done in the
medium's own config file (see ssh_config and
$HOME/.ssh/config).
- ignore_host_errors = no
- If set to ``yes'', ignore errors from host
names that cannot be resolved and attempt to connect anyway (i.e.
because they are aliased in an ssh config file) - see also ``-i''
- key_addhost = Control-plus
- Default key sequence to open AddHost menu.
See below notes on shortcuts.
- key_clientname = Alt-n
- Default key sequence to send cssh client
names to client. See below notes on shortcuts.
- key_quit = Control-q
- Default key sequence to quit the program
(will terminate all open windows). See below notes on shortcuts.
- key_retilehosts = Alt-r
- Default key sequence to retile host
windows. See below notes on shortcuts.
- key_paste = Control-v
- Default key sequence to paste text into
the console window. See below notes on shortcuts.
- mouse_paste = Button-2 (middle mouse button)
- Default key sequence to paste text into
the console window using the mouse. See below notes on shortcuts.
- screen_reserve_top = 25
-
- screen_reserve_bottom = 30
-
- screen_reserve_left = 0
-
- screen_reserve_right = 0
- Number of pixels from the screen 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.
- ssh = /path/to/ssh
-
- rsh = /path/to/rsh
- Depending on the value of comms, set the
path of the communication binary.
- terminal = /path/to/terminal
- 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_font = 6x13
- Font to use in the terminal windows. Use
standard X font notation.
- terminal_reserve_top = 0
-
- terminal_reserve_bottom = 0
-
- terminal_reserve_left = 0
-
- terminal_reserve_right = 0
- Number of pixels from the terminal side to
reserve when calculating screen geometry for tiling. Setting these
will help keep cssh from positioning windows over your scroll and
title bars
title bars
- 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
- terminal_title_opt = -T
- Option used with "terminal" to
set the title of the window
set the title of the window
- terminal_allow_send_events = -xrm
'XTerm.VT100.allowSendEvents:true'
- Option required by the terminal to allow
XSendEvents to be received
- title = cssh
- title = cssh
- Title of windows to use for both the
console and terminals.
- use_hotkeys = yes
- Setting to anything other than
"yes" will disable all hotkeys.
- user = $LOGNAME
- Sets the default user for running commands
on clients.
- window_tiling = yes
- Perform window tiling (set to
"no" to disable)
- window_tiling_direction = right
- Direction to tile windows, where ``right''
means starting top left and moving right and then down, and
anything else means starting bottom right and moving left and then
up
-
NOTE: The key shortcut modifiers must be
in the form ``Control'', ``Alt'', or ``Shift'', i.e. with the first
letter capitalised and the rest lower case. Keys may also be
disabled individually by setting to the work
``null''.
AUTHOR
Duncan Ferguson
CREDITS
clusterssh is distributed
under the GNU public license. See the file
LICENSE for details.
A web site for comments, requests, bug reports and bug
fixes/patches is available at <http://clusterssh.sourceforge.net/>
KNOWN BUGS
Swapping virtual desktops
can can a redraw of all the terminal windows. This is due to a lack
of distinction within Tk between switching desktops and
minimising/maximising windows. Until Tk can tell the difference
between the two events, there is no fix (apart from rewriting
everything directly in X)
REPORTING BUGS
- *
- If you have issues running cssh, first try:
"cssh -e [user@]<hostname>[:port]"
This performs two tests to confirm cssh is able to work properly
with the settings provided within the .csshrc file (or
internal defaults).
1. test the terminal window works with the options provided
2. test ssh works to a host with the configured arguments
Configuration options to watch for in ssh are
- Doesnt understand "-o ConnectTimeout=10" - remove the option
in the F<.csshrc> file
- OpenSSH-3.8 using untrusted ssh tunnels - use "-Y" instead of "-X"
or use "ForwardX11Trusted yes' in ssh_config (if you change the
default ssh options from -x to -X)
- *
- If you require support, please run the following commands and
post it on the web site in the support/problems forum:
"perl -V"
"perl -MTk -e 'print $Tk::VERSION,$/'"
"perl -MX11::Protocol -e 'print
$X11::Protocol::VERSION,$/'"
"cat /etc/csshrc $HOME/.csshrc"
- *
- Use the debug switches (-d, -D, or -dD) will turn on debugging
output. However, please only use this option with one host at a
time, i.e. ``cssh -d <host>'' due to the amount of output
produced (in both main and child windows).
SEE ALSO
<http://clusterssh.sourceforge.net/>,
ssh, Tk::overview, X11::Protocol, perl