2009-12-19 17:20:53 +00:00
|
|
|
#!/usr/bin/perl
|
2005-04-25 14:57:28 +00:00
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
2009-12-19 17:20:53 +00:00
|
|
|
use FindBin;
|
2013-04-15 21:56:19 +01:00
|
|
|
use lib $FindBin::Bin. '/../lib';
|
2009-12-19 17:20:53 +00:00
|
|
|
use App::ClusterSSH;
|
|
|
|
|
2013-04-15 21:56:19 +01:00
|
|
|
my $app = App::ClusterSSH->new();
|
2010-06-18 22:10:33 +01:00
|
|
|
$app->run();
|
2005-04-25 14:57:28 +00:00
|
|
|
|
|
|
|
__END__
|
2009-03-09 19:56:27 +00:00
|
|
|
|
|
|
|
=pod
|
|
|
|
|
2005-04-25 14:57:28 +00:00
|
|
|
=head1 NAME
|
|
|
|
|
2011-06-30 11:12:59 +01:00
|
|
|
cssh, crsh, ctel, ccon - Cluster administration tool
|
2005-04-25 14:57:28 +00:00
|
|
|
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
|
2006-07-24 19:12:54 +00:00
|
|
|
S<< cssh [options] [[user@]<server>[:port]|<tag>] [...] >>
|
|
|
|
S<< crsh [options] [[user@]<server>[:port]|<tag>] [...] >>
|
2009-04-06 19:40:13 +00:00
|
|
|
S<< ctel [options] [<server>[:port]|<tag>] [...] >>
|
2011-06-30 11:12:59 +01:00
|
|
|
S<< ccon [options] [[user@]<server>[:port]|<tag>] [...] >>
|
2005-04-25 14:57:28 +00:00
|
|
|
|
|
|
|
=head1 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"
|
2007-10-25 12:08:15 +00:00
|
|
|
then the rsh protocol is used (and the communications channel is insecure),
|
2011-06-30 11:12:59 +01:00
|
|
|
or by "ctel" then telnet is used, or by "ccon" then console is used.
|
2005-04-25 14:57:28 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
=head2 Further Notes
|
|
|
|
|
2011-04-01 15:39:40 +01:00
|
|
|
Please also see L</KNOWN BUGS>.
|
2009-04-06 19:40:13 +00:00
|
|
|
|
2005-04-25 14:57:28 +00:00
|
|
|
=over
|
|
|
|
|
|
|
|
=item *
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
=item *
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
=item *
|
|
|
|
|
2009-04-15 21:47:41 +00:00
|
|
|
If your window manager menu bars are obscured by terminal windows see
|
2013-02-04 17:14:37 +00:00
|
|
|
the C<screen_reserve_XXXXX> options in the F<$HOME/.clusterssh/config> file (see L</"FILES">).
|
2009-04-15 21:47:41 +00:00
|
|
|
|
|
|
|
=item *
|
|
|
|
|
|
|
|
If the terminals overlap too much see the C<terminal_reserve_XXXXX>
|
2013-02-04 17:14:37 +00:00
|
|
|
options in the F<$HOME/.clusterssh/config> file (see L</"FILES">).
|
2009-04-15 21:47:41 +00:00
|
|
|
|
|
|
|
=item *
|
|
|
|
|
2005-04-25 14:57:28 +00:00
|
|
|
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
|
2006-07-24 19:12:54 +00:00
|
|
|
communications protocol instead of ssh.
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2005-06-09 16:03:26 +00:00
|
|
|
=item *
|
|
|
|
|
2007-10-25 12:08:15 +00:00
|
|
|
If the code is called as ctel instead of cssh (i.e. a symlink called
|
|
|
|
ctel points to the cssh file or the file is renamed) telnet is used as the
|
|
|
|
communications protocol instead of ssh.
|
|
|
|
|
|
|
|
=item *
|
|
|
|
|
2011-06-30 11:12:59 +01:00
|
|
|
If the code is called as ccon instead of cssh (i.e. a symlink called
|
|
|
|
ccon points to the cssh file or the file is renamed) console is used as the
|
|
|
|
communications protocol instead of ssh.
|
|
|
|
|
|
|
|
=item *
|
|
|
|
|
2005-06-09 16:03:26 +00:00
|
|
|
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.
|
|
|
|
|
2005-11-28 19:47:37 +00:00
|
|
|
=item *
|
|
|
|
|
2007-11-26 11:06:36 +00:00
|
|
|
If client windows fail to open, try running:
|
|
|
|
|
|
|
|
C<< cssh -e {single host name} >>
|
|
|
|
|
|
|
|
This will test the mechanisms used to open windows to hosts. This could
|
|
|
|
be due to either the C<-xrm> terminal option which enables C<AllowSendEvents>
|
|
|
|
(some terminal do not require this option, other terminals have another
|
|
|
|
method for enabling it - see your terminal documention) or the
|
|
|
|
C<ConnectTimeout> ssh option (see the configuration option C<-o> or file
|
2013-02-04 17:14:37 +00:00
|
|
|
C<$HOME/.clusterssh/config> below to resolve this).
|
2005-11-28 19:47:37 +00:00
|
|
|
|
2005-04-25 14:57:28 +00:00
|
|
|
=back
|
|
|
|
|
|
|
|
=head1 OPTIONS
|
|
|
|
|
2005-06-09 16:03:26 +00:00
|
|
|
Some of these options may also be defined within the configuration file.
|
|
|
|
Default options are shown as appropriate.
|
2005-04-25 14:57:28 +00:00
|
|
|
|
|
|
|
=over
|
|
|
|
|
2009-04-21 20:14:00 +00:00
|
|
|
=item --action,-a '<command>'
|
2009-04-15 17:35:22 +00:00
|
|
|
|
|
|
|
Run the command in each session, i.e. C<-a 'vi /etc/hosts'> to drop straight
|
|
|
|
into a vi session. NOTE: not all communications methods support this (ssh
|
2011-06-30 11:12:59 +01:00
|
|
|
and rsh should, telnet and console will not).
|
2009-04-15 17:35:22 +00:00
|
|
|
|
2011-11-24 21:48:35 +00:00
|
|
|
=item --autoclose,-A <seconds>
|
|
|
|
|
|
|
|
Number of seconds to wait before closing finished terminal windows.
|
|
|
|
|
2010-06-18 23:36:00 +01:00
|
|
|
=item --autoquit,-q|--no-autoquit,-Q
|
|
|
|
|
|
|
|
Enable|Disable automatically quiting after the last client window has closed
|
|
|
|
(overriding the config file)
|
|
|
|
|
2009-04-21 20:14:00 +00:00
|
|
|
=item --cluster-file,-c <file>
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2011-04-01 15:39:40 +01:00
|
|
|
Use supplied file as additional cluster file (see also L</"FILES">)
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2009-04-21 20:14:00 +00:00
|
|
|
=item --config-file,-C <file>
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2011-04-01 15:39:40 +01:00
|
|
|
Use supplied file as additional configuration file (see also L</"FILES">)
|
2005-04-25 14:57:28 +00:00
|
|
|
|
|
|
|
=item -d
|
|
|
|
|
2009-04-21 20:14:00 +00:00
|
|
|
DEPRECATED. See '--debug'.
|
2005-04-25 14:57:28 +00:00
|
|
|
|
|
|
|
=item -D
|
|
|
|
|
2009-04-21 20:14:00 +00:00
|
|
|
DEPRECATED. See '--debug'.
|
|
|
|
|
|
|
|
=item --debug [number].
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2009-04-21 20:14:00 +00:00
|
|
|
Enable debugging. Either a level can be provided or the option can be
|
|
|
|
repeated multiple times. Maximum level is 4.
|
|
|
|
|
|
|
|
=item --evaluate,-e [user@]<hostname>[:port]
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2009-03-09 19:56:27 +00:00
|
|
|
Display and evaluate the terminal and connection arguments so display any
|
|
|
|
potential errors. The <hostname> is required to aid the evaluation.
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2010-06-20 20:30:00 +01:00
|
|
|
=item --font,-f "5x8"
|
2010-06-18 23:32:27 +01:00
|
|
|
|
|
|
|
Specify the font to use in the terminal windows. Use standard X font notation.
|
|
|
|
|
2009-04-21 20:14:00 +00:00
|
|
|
=item --help,-h|-?
|
2005-06-09 16:03:26 +00:00
|
|
|
|
2009-03-09 19:56:27 +00:00
|
|
|
Show basic help text, and exit
|
2005-06-09 16:03:26 +00:00
|
|
|
|
2010-09-09 21:22:53 +01:00
|
|
|
=item --list, -L
|
|
|
|
|
|
|
|
List available cluster tags.
|
|
|
|
|
2009-04-21 20:14:00 +00:00
|
|
|
=item --man,-H
|
2008-02-26 20:05:54 +00:00
|
|
|
|
2009-03-09 19:56:27 +00:00
|
|
|
Show full help test (the man page), and exit
|
|
|
|
|
2011-06-30 11:12:59 +01:00
|
|
|
=item --master,-M <master>
|
|
|
|
|
|
|
|
The console client program polls master as the primary server, rather than the
|
|
|
|
default set at compile time (typically ``console'').
|
|
|
|
|
2009-04-21 20:14:00 +00:00
|
|
|
=item --options,-o "-x -o ConnectTimeout=10" - for ssh connections
|
2005-06-09 16:03:26 +00:00
|
|
|
|
2009-04-21 20:14:00 +00:00
|
|
|
=item --options,-o "" - for rsh connections
|
2005-06-09 16:03:26 +00:00
|
|
|
|
2006-07-24 19:12:54 +00:00
|
|
|
Specify arguments to be passed to ssh or rsh when making the connection.
|
|
|
|
|
2007-12-17 19:05:16 +00:00
|
|
|
B<NOTE:> any "generic" change to the method (i.e. specifying the ssh port to use)
|
2011-04-01 15:39:40 +01:00
|
|
|
should be done in the medium's own config file (see C<ssh_config> and
|
2006-07-24 19:12:54 +00:00
|
|
|
F<$HOME/.ssh/config>).
|
2005-06-09 16:03:26 +00:00
|
|
|
|
2010-06-18 23:36:00 +01:00
|
|
|
=item --output-config,-u
|
2009-03-10 09:37:53 +00:00
|
|
|
|
2010-06-18 23:36:00 +01:00
|
|
|
Output the current configuration in the same format used by the
|
2013-02-04 17:14:37 +00:00
|
|
|
F<$HOME/.clusterssh/config> file.
|
2009-03-10 09:37:53 +00:00
|
|
|
|
2010-06-18 23:36:00 +01:00
|
|
|
=item --port,-p <port>
|
2009-03-09 19:56:27 +00:00
|
|
|
|
2010-06-18 23:36:00 +01:00
|
|
|
Specify an alternate port for connections.
|
2009-03-09 19:56:27 +00:00
|
|
|
|
2009-04-21 20:14:00 +00:00
|
|
|
=item --show-history,-s
|
2007-11-28 22:11:03 +00:00
|
|
|
|
|
|
|
IN BETA: Show history within console window. This code is still being
|
|
|
|
worked upon, but may help some users.
|
|
|
|
|
2013-03-19 18:07:39 +00:00
|
|
|
=item --tag-file,-c <file>
|
|
|
|
|
|
|
|
Use supplied file as additional tag file (see also L</"FILES">)
|
|
|
|
|
2009-04-21 20:14:00 +00:00
|
|
|
=item --term-args,-t ""
|
2005-06-09 16:03:26 +00:00
|
|
|
|
|
|
|
Specify arguments to be passed to terminals being used
|
|
|
|
|
2010-06-18 23:36:00 +01:00
|
|
|
=item --tile,-g|--no-tile,-G
|
|
|
|
|
|
|
|
Enable|Disable window tiling (overriding the config file)
|
|
|
|
|
2009-04-21 20:14:00 +00:00
|
|
|
=item --title,-T "CSSH"
|
2005-06-13 13:56:24 +00:00
|
|
|
|
2009-03-09 19:56:27 +00:00
|
|
|
Specify the initial part of the title used in the console and client windows
|
2005-06-13 13:56:24 +00:00
|
|
|
|
2013-02-27 10:26:05 +00:00
|
|
|
=item --unique-servers,-m
|
|
|
|
|
|
|
|
Connect to each host only once
|
|
|
|
|
2010-09-10 16:00:01 +01:00
|
|
|
=item --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)
|
|
|
|
|
2010-06-18 23:36:00 +01:00
|
|
|
=item --username,-l $LOGNAME
|
2006-07-24 19:12:54 +00:00
|
|
|
|
2010-06-18 23:36:00 +01:00
|
|
|
Specify the default username to use for connections (if different from the
|
|
|
|
currently logged in user). B<NOTE:> will be overridden by <user>@<host>
|
2009-03-09 19:56:27 +00:00
|
|
|
|
2009-04-21 20:14:00 +00:00
|
|
|
=item --version,-v
|
2009-03-09 19:56:27 +00:00
|
|
|
|
|
|
|
Show version information and exit
|
2006-07-24 19:12:54 +00:00
|
|
|
|
2005-04-25 14:57:28 +00:00
|
|
|
=back
|
|
|
|
|
|
|
|
=head1 ARGUMENTS
|
|
|
|
|
|
|
|
The following arguments are support:
|
|
|
|
|
|
|
|
=over
|
|
|
|
|
2006-07-24 19:12:54 +00:00
|
|
|
=item [user@]<hostname>[:port] ...
|
2005-04-25 14:57:28 +00:00
|
|
|
|
|
|
|
Open an xterm to the given hostname and connect to the administration
|
2006-07-24 19:12:54 +00:00
|
|
|
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.
|
2005-04-25 14:57:28 +00:00
|
|
|
|
|
|
|
=item <tag> ...
|
|
|
|
|
2013-04-15 22:30:32 +01:00
|
|
|
Open a series of xterms defined by <tag> in one of the suplimentary
|
|
|
|
configuration files (see L</"FILES">).
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2009-11-27 20:24:10 +00:00
|
|
|
Note: specifying a username on a cluster tag will override any usernames
|
|
|
|
defined in the cluster
|
|
|
|
|
2005-04-25 14:57:28 +00:00
|
|
|
=back
|
|
|
|
|
|
|
|
=head1 KEY SHORTCUTS
|
|
|
|
|
|
|
|
The following key shortcuts are available within the console window, and all
|
|
|
|
of them may be changed via the configuration files.
|
|
|
|
|
|
|
|
=over
|
|
|
|
|
|
|
|
=item Control-q
|
|
|
|
|
|
|
|
Quit the program and close all connections and windows
|
|
|
|
|
|
|
|
=item Control-+
|
|
|
|
|
2009-04-22 19:23:16 +00:00
|
|
|
Open the 'Add Host(s) or Cluster(s)' dialogue box. Mutiple host or cluster
|
|
|
|
names can be entered, separated by spaces.
|
2005-04-25 14:57:28 +00:00
|
|
|
|
|
|
|
=item Alt-n
|
|
|
|
|
2009-06-02 15:03:03 +00:00
|
|
|
Paste in the hostname part of the specific connection string to each
|
|
|
|
client, minus any username or port, i.e.
|
2005-04-25 14:57:28 +00:00
|
|
|
|
|
|
|
C<< scp /etc/hosts server:files/<Alt-n>.hosts >>
|
|
|
|
|
2009-04-22 19:23:16 +00:00
|
|
|
would replace the <Alt-n> with the client's name in each window
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2005-11-28 19:47:37 +00:00
|
|
|
=item Alt-r
|
|
|
|
|
|
|
|
Retile all the client windows
|
|
|
|
|
2005-04-25 14:57:28 +00:00
|
|
|
=back
|
|
|
|
|
2009-03-09 19:22:36 +00:00
|
|
|
=head1 EXAMPLES
|
|
|
|
|
|
|
|
=over
|
|
|
|
|
|
|
|
=item Open up a session to 3 servers
|
|
|
|
|
|
|
|
S<$ cssh server1 server2 server3>
|
|
|
|
|
|
|
|
=item Open up a session to a cluster of servers identified by the tag 'farm1'
|
|
|
|
and give the controlling window a specific title, where the cluster is defined
|
|
|
|
in one of the default configuration files
|
|
|
|
|
|
|
|
S<$ cssh -T 'Web Farm Cluster 1' farm1>
|
|
|
|
|
|
|
|
=item Connect to different servers using different login names. NOTE: this can
|
|
|
|
also be achieved by setting up appropriate options in the F<.ssh/config> file.
|
|
|
|
Do not close cssh when last terminal exits.
|
|
|
|
|
|
|
|
S<$ cssh -Q user1@server1 admin@server2>
|
|
|
|
|
|
|
|
=item Open up a cluster defined in a non-default configuration file
|
|
|
|
|
|
|
|
S<$ cssh -c $HOME/cssh.config db_cluster>
|
|
|
|
|
2009-03-10 09:37:53 +00:00
|
|
|
=item Use telnet on port 2022 instead of ssh
|
2009-03-09 19:22:36 +00:00
|
|
|
|
2009-04-15 21:47:41 +00:00
|
|
|
S<$ ctel -p 2022 server1 server2>
|
2009-03-09 19:22:36 +00:00
|
|
|
|
|
|
|
=item Use rsh instead of ssh
|
|
|
|
|
2009-04-15 21:47:41 +00:00
|
|
|
S<$ crsh server1 server2>
|
2009-03-09 19:22:36 +00:00
|
|
|
|
2011-06-30 11:12:59 +01:00
|
|
|
=item Use console with master as the primary server instead of ssh
|
|
|
|
|
|
|
|
S<$ ccon -M master server1 server2>
|
|
|
|
|
2009-03-09 19:22:36 +00:00
|
|
|
=back
|
|
|
|
|
2005-04-25 14:57:28 +00:00
|
|
|
=head1 FILES
|
|
|
|
|
|
|
|
=over
|
|
|
|
|
2013-03-19 18:07:39 +00:00
|
|
|
=item F</etc/clusters>, F<$HOME/.clusterssh/clusters>
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2013-03-19 18:07:39 +00:00
|
|
|
These files contain a list of tags to server names mappings. When any name
|
2006-12-19 13:02:02 +00:00
|
|
|
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
|
|
|
|
formated is as follows:
|
2005-04-25 14:57:28 +00:00
|
|
|
|
|
|
|
S<< <tag> [user@]<server> [user@]<server> [...] >>
|
|
|
|
|
2006-12-19 13:02:02 +00:00
|
|
|
i.e.
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2006-12-19 13:02:02 +00:00
|
|
|
# List of servers in live
|
|
|
|
live admin1@server1 admin2@server2 server3 server4
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2006-12-19 13:02:02 +00:00
|
|
|
All comments (marked by a #) and blank lines are ignored. Tags may be
|
2013-03-19 18:07:39 +00:00
|
|
|
nested, but be aware of using recursive tags as they are not checked for.
|
|
|
|
|
|
|
|
Extra cluster files may also be specified either as an option on the
|
|
|
|
command line (see C<cluster-file>) or in the users F<$HOME/.clusterssh/config>
|
|
|
|
file (see C<extra_cluster_file> configuration option).
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2013-03-19 18:07:39 +00:00
|
|
|
NOTE: the last tag read overwrites any pre-existing tag of that name
|
2006-07-24 19:12:54 +00:00
|
|
|
|
2009-06-02 14:40:27 +00:00
|
|
|
NOTE: there is a special cluster tag called C<default> - any tags or hosts
|
|
|
|
included within this tag will be automatically opened if no other tags
|
|
|
|
are specified on the command line.
|
|
|
|
|
2013-03-19 18:07:39 +00:00
|
|
|
=item F</etc/tags>, F<$HOME/.clusterssh/tags>
|
|
|
|
|
|
|
|
Very similar to F<cluster> files but the definition is reversed. The
|
|
|
|
format is:
|
|
|
|
|
|
|
|
S<< <host> <tag> [...] >>
|
|
|
|
|
|
|
|
This allows one host to be specified as a member of a number of tags. This
|
|
|
|
format can be clearer than using F<clusters> files.
|
|
|
|
|
|
|
|
Extra tag files may be spcieid either an an option (see C<tag-file>) or within
|
|
|
|
the users F<$HOME/.clusterssh/config> file (see C<extra_tag_file>
|
|
|
|
configuration option).
|
|
|
|
|
|
|
|
NOTE: All tags are added together
|
|
|
|
|
2013-02-04 17:14:37 +00:00
|
|
|
=item F</etc/csshrc> & F<$HOME/.clusterssh/config>
|
2005-04-25 14:57:28 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2007-12-17 19:05:16 +00:00
|
|
|
B<NOTE:> values for entries do not need to be quoted unless it is required
|
|
|
|
for passing arguments, i.e.
|
|
|
|
|
|
|
|
terminal_allow_send_events="-xrm '*.VT100.allowSendEvents:true'"
|
|
|
|
|
|
|
|
should be written as
|
|
|
|
|
|
|
|
terminal_allow_send_events=-xrm '*.VT100.allowSendEvents:true'
|
|
|
|
|
2005-04-25 14:57:28 +00:00
|
|
|
=over
|
|
|
|
|
2011-11-24 21:48:35 +00:00
|
|
|
=item 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. Can be overridden
|
|
|
|
by C<-K> on the command line
|
|
|
|
|
2005-04-25 14:57:28 +00:00
|
|
|
=item auto_quit = yes
|
|
|
|
|
|
|
|
Automatically quit after the last client window closes. Set to anything
|
|
|
|
other than "yes" to disable. Can be overridden by C<-Q> on the command line.
|
|
|
|
|
2006-07-24 19:12:54 +00:00
|
|
|
=item clusters = <blank>
|
|
|
|
|
|
|
|
Define a number of cluster tags in addition to (or to replace) tags defined
|
|
|
|
in the F</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 F</etc/clusters> file, be sure not to create recursivly nested tags.
|
|
|
|
|
2006-12-19 13:02:02 +00:00
|
|
|
=item comms = ssh
|
|
|
|
|
|
|
|
Sets the default communication method (initially taken from the name of
|
|
|
|
program, but can be overridden here).
|
|
|
|
|
2005-06-24 16:32:04 +00:00
|
|
|
=item 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).
|
|
|
|
|
2013-04-15 22:30:32 +01:00
|
|
|
=item 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 on a single line.
|
|
|
|
Any tags that cannot be resolved should be returned unchanged.
|
|
|
|
|
|
|
|
A non-0 exit code will be counted as an error, a warning will be printed and
|
|
|
|
output ignored.
|
|
|
|
|
2006-12-19 13:02:02 +00:00
|
|
|
=item extra_cluster_file = <null>
|
2005-11-28 19:47:37 +00:00
|
|
|
|
2006-12-19 13:02:02 +00:00
|
|
|
Define an extra cluster file in the format of F</etc/clusters>. Multiple
|
|
|
|
files can be specified, seperated by commas. Both ~ and $HOME are acceptable
|
|
|
|
as a to reference the users home directory, i.e.
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2006-12-19 13:02:02 +00:00
|
|
|
extra_cluster_file = ~/clusters, $HOME/clus
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2007-12-19 09:53:42 +00:00
|
|
|
=item ignore_host_errors
|
2005-06-13 13:56:24 +00:00
|
|
|
|
2007-12-19 09:53:42 +00:00
|
|
|
THIS OPTION IS DEPRECATED. It has been left in so current systems continue
|
|
|
|
to function as expected.
|
2005-06-13 13:56:24 +00:00
|
|
|
|
2009-04-22 19:07:32 +00:00
|
|
|
=item key_addhost = Control-Shift-plus
|
2005-04-25 14:57:28 +00:00
|
|
|
|
|
|
|
Default key sequence to open AddHost menu. See below notes on shortcuts.
|
|
|
|
|
|
|
|
=item key_clientname = Alt-n
|
|
|
|
|
|
|
|
Default key sequence to send cssh client names to client. See below notes
|
|
|
|
on shortcuts.
|
|
|
|
|
2006-12-19 13:02:02 +00:00
|
|
|
=item key_paste = Control-v
|
|
|
|
|
|
|
|
Default key sequence to paste text into the console window. See below notes
|
|
|
|
on shortcuts.
|
|
|
|
|
2005-04-25 14:57:28 +00:00
|
|
|
=item key_quit = Control-q
|
|
|
|
|
|
|
|
Default key sequence to quit the program (will terminate all open windows).
|
|
|
|
See below notes on shortcuts.
|
|
|
|
|
2005-05-05 15:22:06 +00:00
|
|
|
=item key_retilehosts = Alt-r
|
|
|
|
|
|
|
|
Default key sequence to retile host windows. See below notes on shortcuts.
|
|
|
|
|
2009-06-04 17:26:16 +00:00
|
|
|
=item max_addhost_menu_cluster_items = 6
|
|
|
|
|
|
|
|
Maximum number of entries in the 'Add Host' menu cluster list before
|
|
|
|
scrollbars are used
|
|
|
|
|
2009-04-22 18:58:24 +00:00
|
|
|
=item max_host_menu_items = 30
|
|
|
|
|
|
|
|
Maximum number of hosts to put into the host menu before starting a new column
|
|
|
|
|
2009-08-11 18:01:06 +01:00
|
|
|
=item menu_host_autotearoff = 0
|
|
|
|
|
|
|
|
=item menu_send_autotearoff = 0
|
|
|
|
|
|
|
|
When set to non-0 will automatically tear-off the host or send menu at
|
|
|
|
program start
|
|
|
|
|
2006-07-24 19:12:54 +00:00
|
|
|
=item 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.
|
|
|
|
|
2013-02-13 21:41:30 +00:00
|
|
|
=item rsh = rsh
|
|
|
|
|
|
|
|
=item ssh = ssh
|
|
|
|
|
|
|
|
=item telnet = telnet
|
|
|
|
|
|
|
|
Set the path to the specific binary to use for the communication method, else
|
|
|
|
uses the first match found in $PATH
|
|
|
|
|
2006-12-19 13:02:02 +00:00
|
|
|
=item rsh_args = <blank>
|
|
|
|
|
|
|
|
=item ssh_args = "-x -o ConnectTimeout=10"
|
|
|
|
|
2013-02-13 21:41:30 +00:00
|
|
|
=item telnet_args = <blank>
|
|
|
|
|
2006-12-19 13:02:02 +00:00
|
|
|
Sets any arguments to be used with the communication method (defaults to ssh
|
|
|
|
arguments).
|
|
|
|
|
2007-12-17 19:05:16 +00:00
|
|
|
B<NOTE:> The given defaults are based on OpenSSH, not commercial ssh software.
|
2006-12-19 13:02:02 +00:00
|
|
|
|
2007-12-17 19:05:16 +00:00
|
|
|
B<NOTE:> Any "generic" change to the method (i.e. specifying the ssh port to use)
|
2011-04-01 15:39:40 +01:00
|
|
|
should be done in the medium's own config file (see C<ssh_config> and
|
2006-12-19 13:02:02 +00:00
|
|
|
F<$HOME/.ssh/config>).
|
|
|
|
|
2009-04-15 21:47:41 +00:00
|
|
|
=item screen_reserve_top = 0
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2009-04-15 21:47:41 +00:00
|
|
|
=item screen_reserve_bottom = 60
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2005-05-05 15:22:06 +00:00
|
|
|
=item screen_reserve_left = 0
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2005-05-05 15:22:06 +00:00
|
|
|
=item screen_reserve_right = 0
|
2005-04-25 14:57:28 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
=item rsh = /path/to/rsh
|
|
|
|
|
2006-12-19 13:02:02 +00:00
|
|
|
=item ssh = /path/to/ssh
|
|
|
|
|
2005-04-25 14:57:28 +00:00
|
|
|
Depending on the value of comms, set the path of the communication binary.
|
|
|
|
|
|
|
|
=item terminal = /path/to/terminal
|
|
|
|
|
|
|
|
Path to the x-windows terminal used for the client.
|
|
|
|
|
|
|
|
=item terminal_args = <blank>
|
|
|
|
|
|
|
|
Arguments to use when opening terminal windows. Otherwise takes defaults
|
|
|
|
from F<$HOME/.Xdefaults> or $<$HOME/.Xresources> file.
|
|
|
|
|
2005-05-05 15:22:06 +00:00
|
|
|
=item terminal_font = 6x13
|
|
|
|
|
2006-07-24 19:12:54 +00:00
|
|
|
Font to use in the terminal windows. Use standard X font notation.
|
2005-05-05 15:22:06 +00:00
|
|
|
|
2009-04-15 21:47:41 +00:00
|
|
|
=item terminal_reserve_top = 5
|
2005-05-05 15:22:06 +00:00
|
|
|
|
|
|
|
=item terminal_reserve_bottom = 0
|
|
|
|
|
2009-04-15 21:47:41 +00:00
|
|
|
=item terminal_reserve_left = 5
|
2005-05-05 15:22:06 +00:00
|
|
|
|
|
|
|
=item 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
|
2009-04-15 21:47:41 +00:00
|
|
|
windows over your scroll and title bars or otherwise overlapping the windows
|
|
|
|
too much.
|
2005-05-05 15:22:06 +00:00
|
|
|
|
2008-12-22 16:11:14 +00:00
|
|
|
=item 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.
|
|
|
|
|
|
|
|
=item terminal_bg_style = dark
|
|
|
|
|
|
|
|
If set to dark, the 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.
|
|
|
|
|
2005-05-05 15:22:06 +00:00
|
|
|
=item 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))
|
|
|
|
|
2005-04-25 14:57:28 +00:00
|
|
|
=item terminal_title_opt = -T
|
|
|
|
|
|
|
|
Option used with C<terminal> to set the title of the window
|
|
|
|
|
2007-11-28 22:18:41 +00:00
|
|
|
=item terminal_allow_send_events = -xrm '*.VT100.allowSendEvents:true'
|
2005-04-25 14:57:28 +00:00
|
|
|
|
|
|
|
Option required by the terminal to allow XSendEvents to be received
|
|
|
|
|
|
|
|
=item title = cssh
|
|
|
|
|
|
|
|
Title of windows to use for both the console and terminals.
|
|
|
|
|
2006-09-06 18:03:56 +00:00
|
|
|
=item 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.
|
|
|
|
|
2010-09-10 16:00:01 +01:00
|
|
|
=item use_all_a_records = no
|
|
|
|
|
|
|
|
If a hostname resolves to multiple IP addresses, set to C<yes> to connect
|
|
|
|
to all of them, not just the first one found.
|
|
|
|
|
2005-04-25 14:57:28 +00:00
|
|
|
=item use_hotkeys = yes
|
|
|
|
|
|
|
|
Setting to anything other than C<yes> will disable all hotkeys.
|
|
|
|
|
|
|
|
=item user = $LOGNAME
|
|
|
|
|
|
|
|
Sets the default user for running commands on clients.
|
|
|
|
|
2005-05-03 13:58:38 +00:00
|
|
|
=item window_tiling = yes
|
|
|
|
|
|
|
|
Perform window tiling (set to C<no> to disable)
|
|
|
|
|
2005-05-05 15:22:06 +00:00
|
|
|
=item window_tiling_direction = right
|
|
|
|
|
|
|
|
Direction to tile windows, where "right" means starting top left and moving
|
2005-11-28 19:47:37 +00:00
|
|
|
right and then down, and anything else means starting bottom right and moving
|
|
|
|
left and then up
|
2005-05-05 15:22:06 +00:00
|
|
|
|
2005-04-25 14:57:28 +00:00
|
|
|
=back
|
|
|
|
|
2007-12-17 19:05:16 +00:00
|
|
|
B<NOTE:> The key shortcut modifiers must be in the form "Control", "Alt", or
|
2005-06-09 16:03:26 +00:00
|
|
|
"Shift", i.e. with the first letter capitalised and the rest lower case. Keys
|
2008-02-26 20:05:54 +00:00
|
|
|
may also be disabled individually by setting to the word "null".
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2009-08-18 21:13:36 +01:00
|
|
|
=item F<$HOME/.csshrc_send_menu>
|
|
|
|
|
|
|
|
This (optional) file contains items to populate the send menu. The
|
|
|
|
default entry could be written as:
|
|
|
|
|
|
|
|
<send_menu>
|
|
|
|
<menu title="Hostname">
|
|
|
|
<command>%s</command>
|
|
|
|
<accelerator>ALT-n</accelerator>
|
|
|
|
</menu>
|
|
|
|
</send_menu>
|
|
|
|
|
|
|
|
Submenus can also be specified as follows:
|
|
|
|
|
|
|
|
<send_menu>
|
|
|
|
<menu title="Default Entries">
|
2009-08-24 22:23:41 +01:00
|
|
|
<detach>yes</detach>
|
2009-08-18 21:13:36 +01:00
|
|
|
<menu title="Hostname">
|
|
|
|
<command>%s</command>
|
|
|
|
<accelerator>ALT-n</accelerator>
|
|
|
|
</menu>
|
|
|
|
</menu>
|
|
|
|
</send_menu>
|
|
|
|
|
|
|
|
B<Caveats:>
|
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
|
|
|
=item There is currently no strict format checking of this file.
|
|
|
|
|
|
|
|
=item The format of the file may change in the future
|
|
|
|
|
|
|
|
=item If the file exists the default entry (Hostname) is not added
|
|
|
|
|
|
|
|
=back
|
|
|
|
|
|
|
|
The following replacement macros are available:
|
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
|
|
|
=item %s
|
|
|
|
|
|
|
|
Hostname part of the specific connection string to each client, minus any
|
|
|
|
username or port
|
|
|
|
|
|
|
|
=item %u
|
|
|
|
|
|
|
|
Username part of the connection string to each client
|
|
|
|
|
|
|
|
=item %h
|
|
|
|
|
|
|
|
Hostname of server where cssh is being run from
|
|
|
|
|
|
|
|
=item %n
|
|
|
|
|
|
|
|
<RETURN> code
|
|
|
|
|
|
|
|
=back
|
|
|
|
|
|
|
|
B<NOTE:> requires L<XML::Simple> to be installed
|
|
|
|
|
2005-04-25 14:57:28 +00:00
|
|
|
=back
|
|
|
|
|
2009-04-06 19:40:13 +00:00
|
|
|
=head1 KNOWN BUGS
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2009-04-06 19:40:13 +00:00
|
|
|
=over 4
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2009-04-06 19:40:13 +00:00
|
|
|
=item 1.
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2009-04-06 19:40:13 +00:00
|
|
|
Catering for IPv6 addresses is minimal. This is due to a conflict
|
|
|
|
between IPv6 addresses and port numbers within the same
|
|
|
|
server definition since they both use the same seperator, i.e. is the
|
|
|
|
following just an IPv6 address, or an address + port number of 2323?
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2009-04-06 19:40:13 +00:00
|
|
|
2001:db8::1428:2323
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2009-04-06 19:40:13 +00:00
|
|
|
Exactly - I cannot tell either. the IPv6 address without a port is assumed
|
|
|
|
in those cases where it cannot be determined and a warning is issued.
|
|
|
|
|
|
|
|
Possible work arounds include:
|
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
|
|
|
=item a.
|
|
|
|
|
2009-04-07 17:17:30 +00:00
|
|
|
Use square brackets around the IPv6 address, i.e.
|
|
|
|
[2001:db8::1428]:2323
|
|
|
|
or
|
|
|
|
[2001:db8::1428:2323]
|
|
|
|
as appropriate so there is no ambiguity
|
|
|
|
|
|
|
|
=item b.
|
|
|
|
|
2009-04-06 19:40:13 +00:00
|
|
|
Use the full IPv6 address if also using a port number - the 8th colon
|
|
|
|
is assumed to be the port seperator.
|
|
|
|
|
2009-04-07 17:17:30 +00:00
|
|
|
=item c.
|
2009-04-06 19:40:13 +00:00
|
|
|
|
|
|
|
Define the IPv6 address in your /etc/hosts file, DNS or other name service
|
|
|
|
lookup mechanism and use the hostname instead of the address.
|
|
|
|
|
|
|
|
=back
|
|
|
|
|
|
|
|
=item 2.
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2009-04-06 19:40:13 +00:00
|
|
|
Swapping virtual desktops can a redraw of all the terminal windows. This
|
2006-07-24 19:12:54 +00:00
|
|
|
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)
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2009-04-06 19:40:13 +00:00
|
|
|
=back
|
|
|
|
|
|
|
|
Anyone with any good ideas to fix the above bugs is more than welcome to get
|
|
|
|
in touch and/or provide a patch.
|
|
|
|
|
2005-04-25 14:57:28 +00:00
|
|
|
=head1 REPORTING BUGS
|
|
|
|
|
|
|
|
=over 2
|
|
|
|
|
|
|
|
=item *
|
|
|
|
|
2006-07-24 19:12:54 +00:00
|
|
|
If you have issues running cssh, first try:
|
|
|
|
|
|
|
|
C<< cssh -e [user@]<hostname>[:port] >>
|
|
|
|
|
|
|
|
This performs two tests to confirm cssh is able to work properly with the
|
2013-02-04 17:14:37 +00:00
|
|
|
settings provided within the F<$HOME/.clusterssh/config> file (or internal defaults).
|
2006-07-24 19:12:54 +00:00
|
|
|
|
|
|
|
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
|
2013-02-04 17:14:37 +00:00
|
|
|
in the F<$HOME/.clusterssh/config> file
|
2006-07-24 19:12:54 +00:00
|
|
|
|
|
|
|
- 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)
|
|
|
|
|
|
|
|
=item *
|
|
|
|
|
2005-04-25 14:57:28 +00:00
|
|
|
If you require support, please run the following commands
|
|
|
|
and post it on the web site in the support/problems forum:
|
|
|
|
|
|
|
|
C<< perl -V >>
|
|
|
|
|
|
|
|
C<< perl -MTk -e 'print $Tk::VERSION,$/' >>
|
|
|
|
|
|
|
|
C<< perl -MX11::Protocol -e 'print $X11::Protocol::VERSION,$/' >>
|
|
|
|
|
2013-02-04 17:14:37 +00:00
|
|
|
C<< cat /etc/csshrc $HOME/.clusterssh/config >>
|
2006-07-24 19:12:54 +00:00
|
|
|
|
2005-04-25 14:57:28 +00:00
|
|
|
=item *
|
|
|
|
|
|
|
|
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).
|
|
|
|
|
|
|
|
=back
|
|
|
|
|
|
|
|
=head1 SEE ALSO
|
|
|
|
|
|
|
|
L<http://clusterssh.sourceforge.net/>,
|
2011-04-01 15:39:40 +01:00
|
|
|
C<ssh>,
|
2005-04-25 14:57:28 +00:00
|
|
|
L<Tk::overview>,
|
|
|
|
L<X11::Protocol>,
|
2011-04-01 15:39:40 +01:00
|
|
|
C<perl>
|
2005-04-25 14:57:28 +00:00
|
|
|
|
2010-06-20 20:23:41 +01:00
|
|
|
=head1 CREDITS
|
|
|
|
|
|
|
|
A web site for comments, requests, bug reports and bug fixes/patches is
|
|
|
|
available at L<http://clusterssh.sourceforge.net/>
|
|
|
|
|
2009-04-06 19:40:13 +00:00
|
|
|
=head1 AUTHOR
|
|
|
|
|
2010-06-20 20:23:41 +01:00
|
|
|
Duncan Ferguson, C<< <duncan_j_ferguson at yahoo.co.uk> >>
|
2009-04-06 19:40:13 +00:00
|
|
|
|
2010-06-20 20:23:41 +01:00
|
|
|
=head1 LICENSE AND COPYRIGHT
|
2009-04-06 19:40:13 +00:00
|
|
|
|
2010-06-20 20:23:41 +01:00
|
|
|
Copyright 1999-2010 Duncan Ferguson.
|
2009-04-06 19:40:13 +00:00
|
|
|
|
2010-06-20 20:23:41 +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.
|
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information.
|
2009-04-06 19:40:13 +00:00
|
|
|
|
2005-04-25 14:57:28 +00:00
|
|
|
=cut
|
2010-06-20 20:23:41 +01:00
|
|
|
|
|
|
|
1;
|