2017-04-13 09:02:00 +01:00
|
|
|
NAME
|
|
|
|
cssh - Cluster administration tool
|
|
|
|
|
|
|
|
VERSION
|
2017-12-23 12:46:48 +00:00
|
|
|
This documentation is for version: 4.12
|
2017-04-13 09:02:00 +01:00
|
|
|
|
|
|
|
SYNOPSIS
|
2017-08-08 20:11:01 +01:00
|
|
|
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]
|
2017-04-13 09:02:00 +01:00
|
|
|
|
|
|
|
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.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
* 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").
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
* If the terminals overlap too much see the "terminal_reserve_XXXXX"
|
|
|
|
options in the $HOME/.clusterssh/config file (see "FILES").
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
* 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.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
* If client windows fail to open, try running:
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
"cssh -e {single host name}"
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
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".
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
OPTIONS
|
|
|
|
Some of these options may also be defined within the configuration file.
|
|
|
|
Default options are shown as appropriate.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--action '<command>', -a '<command>'
|
|
|
|
Run the command in each session, e.g. "-a 'vi /etc/hosts'" to drop
|
|
|
|
straight into a vi session.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--autoclose <seconds>, -K <seconds>
|
|
|
|
Number of seconds to wait before closing finished terminal windows.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--autoquit, -q
|
|
|
|
Toggle automatically quiting after the last client window has closed
|
|
|
|
(overriding the config file).
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--cluster-file '<filename>', -c '<filename>'
|
|
|
|
Use supplied file as additional cluster file (see also "FILES").
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-08-08 20:11:01 +01:00
|
|
|
--cols <cols>, -x <cols>
|
|
|
|
Number of columns
|
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--config-file '<filename>', -C '<filename>'
|
|
|
|
Use supplied file as additional configuration file (see also
|
|
|
|
"FILES").
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--debug [[...] || <INTEGER>]
|
|
|
|
Enable debugging. Either a level can be provided or the option can
|
|
|
|
be repeated multiple times. Maximum level is 9.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--dump-config, -d
|
|
|
|
Dump the current configuration in the same format used by the
|
|
|
|
$HOME/.clusterssh/config file.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--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.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-08-08 20:11:01 +01:00
|
|
|
--fillscreen
|
|
|
|
Resize terminal windows to fill the whole available screen
|
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--font '<font>', -f '<font>'
|
|
|
|
Specify the font to use in the terminal windows. Use standard X font
|
|
|
|
notation such as "5x8".
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--help, -h
|
|
|
|
Show basic help text and exit
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--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.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--man, -H
|
|
|
|
Show full help text (the man page) and exit
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--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.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
Default: -x -o ConnectTimeout=10
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--port <port>, -p <port>
|
|
|
|
Specify an alternate port for connections.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--quiet, -Q
|
|
|
|
Do not output extra text when using some options
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-08-08 20:11:01 +01:00
|
|
|
--rows <rows>, -y <rows>
|
|
|
|
Number of rows
|
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--show-history, -s
|
|
|
|
Show history within console window.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--tag-file '<filename>', -r '<filename>'
|
|
|
|
Use supplied file as additional tag file (see also "FILES")
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--term-args '<STRING>', -t '<STRING>'
|
|
|
|
Specify arguments to be passed to terminals being used.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--tile, -g
|
|
|
|
Toggle window tiling (overriding the config file).
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--title '<title>', -T '<title>'
|
|
|
|
Specify the initial part of the title used in the console and client
|
|
|
|
windows.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--unique-servers, -u
|
|
|
|
Toggle connecting to each host only once when a hostname has been
|
|
|
|
specified multiple times.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--usage, -?
|
|
|
|
Show synopsis and exit
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--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).
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--username '<username>', -l '<username>'
|
|
|
|
Specify the default username to use for connections (if different
|
|
|
|
from the currently logged in user). NOTE: will be overridden by
|
|
|
|
<user>@<host>.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
--version, -v
|
|
|
|
Show version information and exit
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
ARGUMENTS
|
|
|
|
The following arguments are supported:
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
[user@]<hostname>[:port] ...
|
|
|
|
Open an xterm to the given hostname and connect to the
|
|
|
|
administration console. The optional port number can be used if the
|
|
|
|
server is not listening on the standard port.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
<tag> ...
|
|
|
|
Open a series of xterms defined by <tag> in one of the supplementary
|
|
|
|
configuration files (see "FILES").
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
Note: specifying a username on a cluster tag will override any
|
|
|
|
usernames defined in the cluster.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
KEY SHORTCUTS
|
|
|
|
The following key shortcuts are available within the console window, and
|
|
|
|
all of them may be changed via the configuration files.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
Control-Shift-plus
|
|
|
|
Open the 'Add Host(s) or Cluster(s)' dialogue box. Multiple host or
|
|
|
|
cluster names can be entered, separated by spaces.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
Alt-n
|
|
|
|
Paste in the hostname part of the specific connection string to each
|
|
|
|
client, minus any username or port, e.g.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
"scp /etc/hosts server:files/<Alt-n>.hosts"
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
would replace the <Alt-n> with the client's name in each window.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
Alt-l
|
|
|
|
Paste in the hostname of the server cssh is being run on
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
Alt-q
|
|
|
|
Quit the program and close all connections and windows.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
Alt-r
|
|
|
|
Retile all the client windows.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
Alt-u
|
|
|
|
Paste in the username for the connection
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
EXAMPLES
|
|
|
|
Open up a session to 3 servers
|
|
|
|
$ cssh server1 server2 server3
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
Open up a session to a cluster of servers identified by the tag 'farm1'
|
|
|
|
and give the controlling window a specific title, where the tag is
|
|
|
|
defined in one of the default configuration files
|
|
|
|
$ cssh -T 'Web Farm Cluster 1' farm1
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
Connect to different servers using different login names. NOTE: this can
|
|
|
|
also be achieved by setting up appropriate options in the configuration
|
|
|
|
files. Do not close the console when the last terminal exits.
|
|
|
|
$ cssh user1@server1 admin@server2
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
Open up a cluster defined in a non-default configuration file
|
|
|
|
$ cssh -c $HOME/cssh.extra_clusters db_cluster
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
Override the configured/default port to use 2022 instead
|
|
|
|
$ cssh -p 2022 server1 server2
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
FILES
|
|
|
|
/etc/clusters, $HOME/.clusterssh/clusters
|
|
|
|
These files contain 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. If it is a tag, then the tag is replaced with the list of
|
|
|
|
servers. The format is as follows:
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
<tag> [user@]<server>[:port] [user@]<server>[:port] [...]
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
e.g.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
# List of servers in live
|
|
|
|
live admin1@server1 admin2@server2:2022 server3 server4
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
All comments (marked by a #) and blank lines are ignored. Tags may
|
|
|
|
be nested, but be aware of using recursive tags as they are not
|
|
|
|
checked for.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
Servers can be defined using expansion macros:
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
"webservers websvr{a,b,c}"
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
would be expanded to
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
"webservers websvra websvrb websvrc"
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
and
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
"webservers websvr{6..9}"
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
would be expanded to
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
"webservers websvr6 websvr7 websvr8 websvr9"
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
Extra cluster files may also be specified either as an option on the
|
|
|
|
command line (see "cluster-file") or in the user's
|
|
|
|
$HOME/.clusterssh/config file (see "extra_cluster_file"
|
|
|
|
configuration option).
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
NOTE: the last tag read overwrites any pre-existing tag of that
|
|
|
|
name.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
NOTE: there is a special cluster tag called "default" - any tags or
|
|
|
|
hosts included within this tag will be automatically opened if
|
|
|
|
nothing is specified on the command line.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
/etc/tags, $HOME/.clusterssh/tags
|
|
|
|
Very similar to clusters files but the definition is reversed. The
|
|
|
|
format is:
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
<host> <tag> [...]
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
This allows one host to be specified as a member of a number of
|
|
|
|
tags. This format can be clearer than using clusters files.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
Extra tag files may be specified either as an option (see
|
|
|
|
"tag-file") or within the user's $HOME/.clusterssh/config file (see
|
|
|
|
"extra_tag_file" configuration option).
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
NOTE: All tags are added together
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
/etc/csshrc & $HOME/.clusterssh/config
|
|
|
|
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.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
NOTE: values for entries do not need to be quoted unless it is
|
|
|
|
required for passing arguments, e.g.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
"terminal_allow_send_events="-xrm '*.VT100.allowSendEvents:true'""
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
should be written as
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
"terminal_allow_send_events=-xrm '*.VT100.allowSendEvents:true'"
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
auto_close = 5
|
|
|
|
Close terminal window after this many seconds. If set to 0 will
|
|
|
|
instead wait on input from the user in each window before
|
|
|
|
closing. See also --autoclose and --no-autoclose
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
auto_quit = 1
|
|
|
|
Automatically quit after the last client window closes. Set to 0
|
|
|
|
to disable. See also --autoquit
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
auto_wm_decoration_offsets = no
|
|
|
|
Enable or disable alternative algorithm for calculating terminal
|
|
|
|
positioning.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
comms = ssh
|
|
|
|
Sets the default communication method (initially taken from the
|
|
|
|
name of the program, but can be overridden here).
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
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).
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-12-22 12:17:40 +00:00
|
|
|
external_command_mode = 0600
|
|
|
|
File mode bits for the external_command_pipe.
|
|
|
|
|
|
|
|
external_command_pipe = <null>
|
|
|
|
Define the full path to an external command pipe that can be
|
|
|
|
written to for controlling some aspects of ClusterSSH, such as
|
|
|
|
opening sessions to more clusters.
|
|
|
|
|
|
|
|
Commands:
|
|
|
|
|
|
|
|
"open <tag|hostname>" - open new sessions to provided tag or
|
|
|
|
hostname
|
|
|
|
|
|
|
|
"retile" - force window retiling
|
|
|
|
|
|
|
|
e.g.: "echo 'open localhost'" /path/to/external_command_pipe >>
|
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
external_cluster_command = <null>
|
|
|
|
Define the full path to an external command that can be used to
|
|
|
|
resolve tags to host names. This command can be written in any
|
|
|
|
language. The script must accept a list of tags to resolve and
|
|
|
|
output a list of hosts (space separated on a single line). Any
|
|
|
|
tags that cannot be resolved should be returned unchanged.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
A non-0 exit code will be counted as an error, a warning will be
|
|
|
|
printed and output ignored.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
If the external command is given a "-L" option it should output
|
|
|
|
a list of tags (space separated on a single line) it can resolve
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
extra_cluster_file = <null>
|
|
|
|
Define an extra cluster file in the format of /etc/clusters.
|
|
|
|
Multiple files can be specified, separated by commas. Both ~ and
|
|
|
|
$HOME are acceptable as a reference to the user's home
|
|
|
|
directory, e.g.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
"extra_cluster_file = ~/clusters, $HOME/clus"
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
extra_tag_file = <null>
|
|
|
|
Define an extra tag file in the format of /etc/tags. Multiple
|
|
|
|
files can be specified, separated by commas. Both ~ and $HOME
|
|
|
|
are acceptable as a reference to the user's home directory, e.g.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
"extra_tag_file = ~/tags, $HOME/tags"
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
key_addhost = Control-Shift-plus
|
|
|
|
Default key sequence to open AddHost menu. See "KEY SHORTCUTS"
|
|
|
|
for more information.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
hide_menu = 0
|
|
|
|
If set to 1, hide the menu bar (File, Hosts, Send, Help) in the
|
|
|
|
console.
|
|
|
|
|
|
|
|
key_clientname = Alt-n
|
|
|
|
Default key sequence to send cssh client names to client. See
|
|
|
|
"KEY SHORTCUTS" for more information.
|
|
|
|
|
|
|
|
key_localname = Alt-l
|
|
|
|
Default key sequence to send hostname of local server to client.
|
|
|
|
See "KEY SHORTCUTS" for more information.
|
|
|
|
|
|
|
|
key_paste = Control-v
|
|
|
|
Default key sequence to paste text into the console window. See
|
|
|
|
"KEY SHORTCUTS" for more information.
|
|
|
|
|
|
|
|
key_quit = Control-q
|
|
|
|
Default key sequence to quit the program (will terminate all
|
|
|
|
open windows). See "KEY SHORTCUTS" for more information.
|
|
|
|
|
|
|
|
key_retilehosts = Alt-r
|
|
|
|
Default key sequence to retile host windows. See "KEY SHORTCUTS"
|
|
|
|
for more information.
|
|
|
|
|
|
|
|
key_username = Alt-u
|
|
|
|
Default key sequence to send username to client. See "KEY
|
|
|
|
SHORTCUTS" for more information.
|
|
|
|
|
|
|
|
macro_servername = %s
|
|
|
|
macro_hostname = %h
|
|
|
|
macro_username = %u
|
|
|
|
macro_newline = %n
|
|
|
|
macro_version = %v
|
|
|
|
Change the replacement macro used when either using a 'Send'
|
|
|
|
menu item, or when pasting text into the main console.
|
|
|
|
|
|
|
|
macros_enabled = yes
|
|
|
|
Enable or disable macro replacement. Note: this affects all the
|
|
|
|
"macro_*" variables above.
|
|
|
|
|
|
|
|
max_addhost_menu_cluster_items = 6
|
|
|
|
Maximum number of entries in the 'Add Host' menu cluster list
|
|
|
|
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
|
|
|
|
Sort::Naturally installed.
|
|
|
|
|
|
|
|
user = $LOGNAME
|
|
|
|
Sets the default user for running commands on clients.
|
|
|
|
|
|
|
|
window_tiling = 1
|
|
|
|
Perform window tiling (set to 0 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", e.g. with the first letter capitalised and the
|
|
|
|
rest lower case. Keys may also be disabled individually by setting
|
|
|
|
to the word "null".
|
|
|
|
|
|
|
|
$HOME/.clusterssh/send_menu
|
|
|
|
This (optional) file contains items to populate the send menu. The
|
|
|
|
default entry could be written as:
|
|
|
|
|
|
|
|
<send_menu>
|
|
|
|
<menu title="Use Macros">
|
|
|
|
<toggle/>
|
|
|
|
<accelerator>ALT-p</accelerator>
|
|
|
|
</menu>
|
|
|
|
<menu title="Remote Hostname">
|
|
|
|
<command>%s</command>
|
|
|
|
<accelerator>ALT-n</accelerator>
|
|
|
|
</menu>
|
|
|
|
<menu title="Local Hostname">
|
|
|
|
<command>%s</command>
|
|
|
|
<accelerator>ALT-l</accelerator>
|
|
|
|
</menu>
|
|
|
|
<menu title="Username">
|
|
|
|
<command>%u</command>
|
|
|
|
<accelerator>ALT-u</accelerator>
|
|
|
|
</menu>
|
|
|
|
<menu title="Test Text">
|
|
|
|
<command>echo "ClusterSSH Version: %v%n</command>
|
|
|
|
</menu>
|
|
|
|
</send_menu>
|
|
|
|
|
|
|
|
Submenus can also be specified as follows:
|
|
|
|
|
|
|
|
<send_menu>
|
|
|
|
<menu title="Default Entries">
|
|
|
|
<detach>yes</detach>
|
|
|
|
<menu title="Hostname">
|
|
|
|
<command>%s</command>
|
|
|
|
<accelerator>ALT-n</accelerator>
|
|
|
|
</menu>
|
|
|
|
</menu>
|
|
|
|
</send_menu>
|
|
|
|
|
|
|
|
Caveats:
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
There is currently no strict format checking of this file.
|
|
|
|
The format of the file may change in the future
|
|
|
|
If the file exists, the default entry (Hostname) is not added
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
The following replacement macros are available (note: these can be
|
|
|
|
changed in the configuration file):
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
%s Hostname part of the specific connection string to each client,
|
|
|
|
minus any username or port
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
%u Username part of the connection string to each client
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
%h Hostname of server where cssh is being run from
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
%n "RETURN" code
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
NOTE: requires XML::Simple to be installed
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
KNOWN BUGS
|
|
|
|
If you have any ideas about how to fix the below bugs, please get in
|
|
|
|
touch and/or provide a patch.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
* Swapping virtual desktops can cause 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).
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
REPORTING BUGS
|
|
|
|
* If you have issues running cssh, first try:
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
"cssh -e [user@]<hostname>[:port]"
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
This performs two tests to confirm cssh is able to work properly
|
|
|
|
with the settings provided within the $HOME/.clusterssh/config file
|
|
|
|
(or internal defaults).
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
1 Test the terminal window works with the options provided
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
2 Test ssh works to a host with the configured arguments
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
Configuration options to watch for in ssh are
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
SSH doesn't understand "-o ConnectTimeout=10" - remove the option
|
|
|
|
from the $HOME/.clusterssh/config file
|
|
|
|
OpenSSH-3.8 using untrusted ssh tunnels - use "-Y" instead of "-X"
|
|
|
|
or use "ForwardX11Trusted yes" in $HOME/.ssh/ssh_config (if you
|
|
|
|
change the default ssh options from "-x" to "-X")
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
* If you require support, please run the following commands and post
|
|
|
|
it on the web site in the support/problems forum:
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
"perl -V"
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
"perl -MTk -e 'print $Tk::VERSION,$/'"
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
"perl -MX11::Protocol -e 'print $X11::Protocol::VERSION,$/'"
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
"cat /etc/csshrc $HOME/.clusterssh/config"
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
* Using the debug option (--debug) will turn on debugging output.
|
|
|
|
Repeat the option to increase the amount of debug. However, if
|
|
|
|
possible please only use this option with one host at a time, e.g.
|
|
|
|
"cssh --debug <host>" due to the amount of output produced (in both
|
|
|
|
main and child windows).
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
SEE ALSO
|
|
|
|
<http://clusterssh.sourceforge.net/>, "ssh", Tk::overview,
|
|
|
|
X11::Protocol, "perl"
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
CREDITS
|
|
|
|
A web site for comments, requests, bug reports and bug fixes/patches is
|
|
|
|
available at: <https://github.com/duncs/clusterssh>
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
AUTHOR
|
|
|
|
Duncan Ferguson, "<duncan_j_ferguson at yahoo.co.uk>"
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
LICENSE AND COPYRIGHT
|
|
|
|
Copyright 1999-2016 Duncan Ferguson.
|
2017-04-13 08:42:13 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
This program is free software; you can redistribute it and/or modify it
|
|
|
|
under the terms of either: the GNU General Public License as published
|
|
|
|
by the Free Software Foundation; or the Artistic License.
|
2017-04-13 08:36:35 +01:00
|
|
|
|
2017-04-13 09:02:00 +01:00
|
|
|
See http://dev.perl.org/licenses/ for more information.
|
2017-04-13 08:36:35 +01:00
|
|
|
|