App-ClusterSSH
view release on metacpan or search on metacpan
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
from the currently logged in user). NOTE: will be overridden by
<user>@<host>.
--version, -v
Show version information and exit
ARGUMENTS
The following arguments are supported:
[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.
<tag> ...
Open a series of xterms defined by <tag> in one of the supplementary
configuration files (see "FILES").
Note: specifying a username on a cluster tag will override any
usernames defined in the cluster.
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
</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:
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
The following replacement macros are available (note: these can be
changed in the configuration file):
%s Hostname part of the specific connection string to each client,
minus any username or port
%u Username part of the connection string to each client
%h Hostname of server where cssh is being run from
%n "RETURN" code
NOTE: requires XML::Simple to be installed
KNOWN BUGS
If you have any ideas about how to fix the below bugs, please get in
touch and/or provide a patch.
* 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).
TROUBLESHOOTING
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 $HOME/.clusterssh/config 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:
* 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")
SUPPORT AND REPORTING BUGS
A web site for comments, requests, bug reports and bug fixes/patches is
available at: <https://github.com/duncs/clusterssh>
If you require support, please run the following commands and create an
issue via: <https://github.com/duncs/clusterssh/issues>
"perl -V"
"perl -MTk -e 'print $Tk::VERSION,$/'"
"perl -MX11::Protocol -e 'print $X11::Protocol::VERSION,$/'"
"cat /etc/csshrc $HOME/.clusterssh/config"
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).
SEE ALSO
<https://github.com/duncs/clusterssh/wiki/>, "ssh", Tk::overview,
X11::Protocol, "perl"
AUTHOR
Duncan Ferguson, "<duncan_j_ferguson at yahoo.co.uk>"
LICENSE AND COPYRIGHT
Copyright 1999-2018 Duncan Ferguson.
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.
( run in 0.942 second using v1.01-cache-2.11-cpan-39bf76dae61 )