App-ClusterSSH
view release on metacpan or search on metacpan
client, minus any username or port, e.g.
"scp /etc/hosts server:files/<Alt-n>.hosts"
would replace the <Alt-n> with the client's name in each window.
Alt-l
Paste in the hostname of the server cssh is being run on
Alt-q
Quit the program and close all connections and windows.
Alt-r
Retile all the client windows.
Alt-u
Paste in the username for the connection
EXAMPLES
Open up a session to 3 servers
$ cssh server1 server2 server3
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
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
Open up a cluster defined in a non-default configuration file
$ cssh -c $HOME/cssh.extra_clusters db_cluster
Override the configured/default port to use 2022 instead
$ cssh -p 2022 server1 server2
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:
<tag> [user@]<server>[:port] [user@]<server>[:port] [...]
e.g.
# List of servers in live
live admin1@server1 admin2@server2:2022 server3 server4
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.
Servers can be defined using expansion macros:
"webservers websvr{a,b,c}"
would be expanded to
"webservers websvra websvrb websvrc"
and
"webservers websvr{6..9}"
would be expanded to
"webservers websvr6 websvr7 websvr8 websvr9"
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).
NOTE: the last tag read overwrites any pre-existing tag of that
name.
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.
/etc/tags, $HOME/.clusterssh/tags
Very similar to clusters files but the definition is reversed. The
format is:
<host> <tag> [...]
This allows one host to be specified as a member of a number of
tags. This format can be clearer than using clusters files.
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).
NOTE: All tags are added together
/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.
NOTE: values for entries do not need to be quoted unless it is
required for passing arguments, e.g.
"terminal_allow_send_events="-xrm '*.VT100.allowSendEvents:true'""
should be written as
"terminal_allow_send_events=-xrm '*.VT100.allowSendEvents:true'"
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
auto_quit = 1
Automatically quit after the last client window closes. Set to 0
to disable. See also --autoquit
auto_wm_decoration_offsets = no
Enable or disable alternative algorithm for calculating terminal
positioning.
comms = ssh
Sets the default communication method (initially taken from the
name of the program, but can be overridden here).
( run in 0.465 second using v1.01-cache-2.11-cpan-5623c5533a1 )