| 1 |
NAME |
| 2 |
cssh - Cluster administration tool |
| 3 |
|
| 4 |
VERSION |
| 5 |
This documentation is for version: 4.18 |
| 6 |
|
| 7 |
SYNOPSIS |
| 8 |
cssh [-a '<command>'] [-K <seconds>] [-q] [-c '<filename>'] [-x <cols>] |
| 9 |
[-C '<filename>'] [--debug [[...] || <INTEGER>]] [-d] [-e |
| 10 |
'<[user@]<host>[:port]>'] [--fillscreen] [-f '<font>'] [-h] [-L '[tag]'] |
| 11 |
[-H] [-o '<STRING>'] [-p <port>] [-Q] [-y <rows>] [-s] [-r '<filename>'] |
| 12 |
[-t '<STRING>'] [-g] [-T '<title>'] [-u] [-?] [-A] [-l '<username>'] |
| 13 |
[-v] |
| 14 |
|
| 15 |
RELATED |
| 16 |
Also see the individual man pages for each of these utilities |
| 17 |
|
| 18 |
ccon - Use 'console' as the communication method |
| 19 |
crsh - Use 'rsh' as the communication method |
| 20 |
csftp - Use 'sftp' as the communication method |
| 21 |
ctel - Use 'telnet' as the communication method |
| 22 |
|
| 23 |
DESCRIPTION |
| 24 |
The command opens an administration console and an xterm to all |
| 25 |
specified hosts. Any text typed into the administration console is |
| 26 |
replicated to all windows. All windows may also be typed into directly. |
| 27 |
|
| 28 |
This tool is intended for (but not limited to) cluster administration |
| 29 |
where the same configuration or commands must be run on each node within |
| 30 |
the cluster. Performing these commands all at once via this tool ensures |
| 31 |
all nodes are kept in sync. |
| 32 |
|
| 33 |
Connections are opened using ssh which must be correctly installed and |
| 34 |
configured. |
| 35 |
|
| 36 |
Extra caution should be taken when editing files as lines may not |
| 37 |
necessarily be in the same order; assuming line 5 is the same across all |
| 38 |
servers and modifying that is dangerous. It's better to search for the |
| 39 |
specific line to be changed and double-check all terminals are as |
| 40 |
expected before changes are committed. |
| 41 |
|
| 42 |
Further Notes |
| 43 |
Please also see "KNOWN BUGS". |
| 44 |
|
| 45 |
* The dotted line on any sub-menu is a tear-off, i.e. click on it and |
| 46 |
the sub-menu is turned into its own window. |
| 47 |
|
| 48 |
* Unchecking a hostname on the Hosts sub-menu will unplug the host |
| 49 |
from the cluster control window, so any text typed into the console |
| 50 |
is not sent to that host. Re-selecting it will plug it back in. |
| 51 |
|
| 52 |
* If your window manager menu bars are obscured by terminal windows |
| 53 |
see the "screen_reserve_XXXXX" options in the |
| 54 |
$HOME/.clusterssh/config file (see "FILES"). |
| 55 |
|
| 56 |
* If the terminals overlap too much see the "terminal_reserve_XXXXX" |
| 57 |
options in the $HOME/.clusterssh/config file (see "FILES"). |
| 58 |
|
| 59 |
* When using ClusterSSH on a large number of systems to connect to a |
| 60 |
single system using an SSH utility (e.g. you issue a command to to |
| 61 |
copy a file using scp from the remote computers to a single host) |
| 62 |
and when these connections require authentication (i.e. you are |
| 63 |
going to authenticate with a password), the sshd daemon at that |
| 64 |
location may refuse connections after the number "MaxStartups" limit |
| 65 |
in sshd_config is exceeded. (If this value is not set, it defaults |
| 66 |
to 10). This is expected behavior; sshd uses this mechanism to |
| 67 |
prevent DoS attacks from unauthenticated sources. Please tune |
| 68 |
sshd_config and reload the SSH daemon, or consider using the |
| 69 |
~/.ssh/authorized_keys mechanism for authentication if you encounter |
| 70 |
this problem. |
| 71 |
|
| 72 |
* If client windows fail to open, try running: |
| 73 |
|
| 74 |
"cssh -e {single host name}" |
| 75 |
|
| 76 |
This will test the mechanisms used to open windows to hosts. This |
| 77 |
could be due to either the "-xrm" terminal option which enables |
| 78 |
"AllowSendEvents" (some terminals do not require this option, other |
| 79 |
terminals have another method for enabling it - see your terminal |
| 80 |
documentation) or the configuration of "ssh". |
| 81 |
|
| 82 |
OPTIONS |
| 83 |
Some of these options may also be defined within the configuration file. |
| 84 |
Default options are shown as appropriate. |
| 85 |
|
| 86 |
--action '<command>', -a '<command>' |
| 87 |
Run the command in each session, e.g. "-a 'vi /etc/hosts'" to drop |
| 88 |
straight into a vi session. |
| 89 |
|
| 90 |
--autoclose <seconds>, -K <seconds> |
| 91 |
Number of seconds to wait before closing finished terminal windows. |
| 92 |
|
| 93 |
--autoquit, -q |
| 94 |
Toggle automatically quitting after the last client window has |
| 95 |
closed (overriding the config file). |
| 96 |
|
| 97 |
--cluster-file '<filename>', -c '<filename>' |
| 98 |
Use supplied file as additional cluster file (see also "FILES"). |
| 99 |
|
| 100 |
--cols <cols>, -x <cols> |
| 101 |
Number of columns |
| 102 |
|
| 103 |
--config-file '<filename>', -C '<filename>' |
| 104 |
Use supplied file as additional configuration file (see also |
| 105 |
"FILES"). |
| 106 |
|
| 107 |
--debug [[...] || <INTEGER>] |
| 108 |
Enable debugging. Either a level can be provided or the option can |
| 109 |
be repeated multiple times. Maximum level is 9. |
| 110 |
|
| 111 |
--dump-config, -d |
| 112 |
Dump the current configuration in the same format used by the |
| 113 |
$HOME/.clusterssh/config file. |
| 114 |
|
| 115 |
--evaluate '<[user@]<host>[:port]>', -e '<[user@]<host>[:port]>' |
| 116 |
Display and evaluate the terminal and connection arguments to |
| 117 |
display any potential errors. The <hostname> is required to aid the |
| 118 |
evaluation. |
| 119 |
|
| 120 |
--fillscreen |
| 121 |
Resize terminal windows to fill the whole available screen |
| 122 |
|
| 123 |
--font '<font>', -f '<font>' |
| 124 |
Specify the font to use in the terminal windows. Use standard X font |
| 125 |
notation such as "5x8". |
| 126 |
|
| 127 |
--help, -h |
| 128 |
Show basic help text and exit |
| 129 |
|
| 130 |
--list '[tag]', -L '[tag]' |
| 131 |
List available cluster tags. Tag is optional. If a tag is provided |
| 132 |
then hosts for that tag are listed. NOTE: format of output changes |
| 133 |
when using "--quiet" or "-Q" option. |
| 134 |
|
| 135 |
--man, -H |
| 136 |
Show full help text (the man page) and exit |
| 137 |
|
| 138 |
--options '<STRING>', -o '<STRING>' |
| 139 |
Specify arguments to be passed to ssh when making the connection. |
| 140 |
NOTE: options for ssh should normally be put into the ssh |
| 141 |
configuration file; see "ssh_config" and $HOME/.ssh/config for more |
| 142 |
details. |
| 143 |
|
| 144 |
Default: -x -o ConnectTimeout=10 |
| 145 |
|
| 146 |
--port <port>, -p <port> |
| 147 |
Specify an alternate port for connections. |
| 148 |
|
| 149 |
--quiet, -Q |
| 150 |
Do not output extra text when using some options |
| 151 |
|
| 152 |
--rows <rows>, -y <rows> |
| 153 |
Number of rows |
| 154 |
|
| 155 |
--show-history, -s |
| 156 |
Show history within console window. |
| 157 |
|
| 158 |
--tag-file '<filename>', -r '<filename>' |
| 159 |
Use supplied file as additional tag file (see also "FILES") |
| 160 |
|
| 161 |
--term-args '<STRING>', -t '<STRING>' |
| 162 |
Specify arguments to be passed to terminals being used. |
| 163 |
|
| 164 |
--tile, -g |
| 165 |
Toggle window tiling (overriding the config file). |
| 166 |
|
| 167 |
--title '<title>', -T '<title>' |
| 168 |
Specify the initial part of the title used in the console and client |
| 169 |
windows. |
| 170 |
|
| 171 |
--unique-servers, -u |
| 172 |
Toggle connecting to each host only once when a hostname has been |
| 173 |
specified multiple times. |
| 174 |
|
| 175 |
--usage, -? |
| 176 |
Show synopsis and exit |
| 177 |
|
| 178 |
--use-all-a-records, -A |
| 179 |
If a hostname resolves to multiple IP addresses, toggle whether or |
| 180 |
not to connect to all of them, or just the first one (see also |
| 181 |
config file entry). |
| 182 |
|
| 183 |
--username '<username>', -l '<username>' |
| 184 |
Specify the default username to use for connections (if different |
| 185 |
from the currently logged in user). NOTE: will be overridden by |
| 186 |
<user>@<host>. |
| 187 |
|
| 188 |
--version, -v |
| 189 |
Show version information and exit |
| 190 |
|
| 191 |
ARGUMENTS |
| 192 |
The following arguments are supported: |
| 193 |
|
| 194 |
[user@]<hostname>[:port] ... |
| 195 |
Open an xterm to the given hostname and connect to the |
| 196 |
administration console. The optional port number can be used if the |
| 197 |
server is not listening on the standard port. |
| 198 |
|
| 199 |
<tag> ... |
| 200 |
Open a series of xterms defined by <tag> in one of the supplementary |
| 201 |
configuration files (see "FILES"). |
| 202 |
|
| 203 |
Note: specifying a username on a cluster tag will override any |
| 204 |
usernames defined in the cluster. |
| 205 |
|
| 206 |
KEY SHORTCUTS |
| 207 |
The following key shortcuts are available within the console window, and |
| 208 |
all of them may be changed via the configuration files. |
| 209 |
|
| 210 |
Control-Shift-plus |
| 211 |
Open the 'Add Host(s) or Cluster(s)' dialogue box. Multiple host or |
| 212 |
cluster names can be entered, separated by spaces. |
| 213 |
|
| 214 |
Alt-n |
| 215 |
Paste in the hostname part of the specific connection string to each |
| 216 |
client, minus any username or port, e.g. |
| 217 |
|
| 218 |
"scp /etc/hosts server:files/<Alt-n>.hosts" |
| 219 |
|
| 220 |
would replace the <Alt-n> with the client's name in each window. |
| 221 |
|
| 222 |
Alt-l |
| 223 |
Paste in the hostname of the server cssh is being run on |
| 224 |
|
| 225 |
Alt-q |
| 226 |
Quit the program and close all connections and windows. |
| 227 |
|
| 228 |
Alt-r |
| 229 |
Retile all the client windows. |
| 230 |
|
| 231 |
Alt-u |
| 232 |
Paste in the username for the connection |
| 233 |
|
| 234 |
Alt-1 |
| 235 |
Alt-2 |
| 236 |
Alt-3 |
| 237 |
Alt-4 |
| 238 |
Run the matching user defined macro on the server and send the |
| 239 |
output to the client |
| 240 |
|
| 241 |
EXAMPLES |
| 242 |
Open up a session to 3 servers |
| 243 |
$ cssh server1 server2 server3 |
| 244 |
|
| 245 |
Open up a session to a cluster of servers identified by the tag 'farm1' |
| 246 |
and give the controlling window a specific title, where the tag is |
| 247 |
defined in one of the default configuration files |
| 248 |
$ cssh -T 'Web Farm Cluster 1' farm1 |
| 249 |
|
| 250 |
Connect to different servers using different login names. NOTE: this can |
| 251 |
also be achieved by setting up appropriate options in the configuration |
| 252 |
files. Do not close the console when the last terminal exits. |
| 253 |
$ cssh user1@server1 admin@server2 |
| 254 |
|
| 255 |
Open up a cluster defined in a non-default configuration file |
| 256 |
$ cssh -c $HOME/cssh.extra_clusters db_cluster |
| 257 |
|
| 258 |
Override the configured/default port to use 2022 instead |
| 259 |
$ cssh -p 2022 server1 server2 |
| 260 |
|
| 261 |
FILES |
| 262 |
/etc/clusters, $HOME/.clusterssh/clusters |
| 263 |
These files contain a list of tags to server names mappings. When |
| 264 |
any name is used on the command line it is checked to see if it is a |
| 265 |
tag. If it is a tag, then the tag is replaced with the list of |
| 266 |
servers. The format is as follows: |
| 267 |
|
| 268 |
<tag> [user@]<server>[:port] [user@]<server>[:port] [...] |
| 269 |
|
| 270 |
e.g. |
| 271 |
|
| 272 |
# List of servers in live |
| 273 |
live admin1@server1 admin2@server2:2022 server3 server4 |
| 274 |
|
| 275 |
All comments (marked by a #) and blank lines are ignored. Tags may |
| 276 |
be nested, but be aware of using recursive tags as they are not |
| 277 |
checked for. |
| 278 |
|
| 279 |
Servers can be defined using expansion macros: |
| 280 |
|
| 281 |
"webservers websvr{a,b,c}" |
| 282 |
|
| 283 |
would be expanded to |
| 284 |
|
| 285 |
"webservers websvra websvrb websvrc" |
| 286 |
|
| 287 |
and |
| 288 |
|
| 289 |
"webservers websvr{6..9}" |
| 290 |
|
| 291 |
would be expanded to |
| 292 |
|
| 293 |
"webservers websvr6 websvr7 websvr8 websvr9" |
| 294 |
|
| 295 |
Extra cluster files may also be specified either as an option on the |
| 296 |
command line (see "cluster-file") or in the user's |
| 297 |
$HOME/.clusterssh/config file (see "extra_cluster_file" |
| 298 |
configuration option). |
| 299 |
|
| 300 |
NOTE: the last tag read overwrites any pre-existing tag of that |
| 301 |
name. |
| 302 |
|
| 303 |
NOTE: there is a special cluster tag called "default" - any tags or |
| 304 |
hosts included within this tag will be automatically opened if |
| 305 |
nothing is specified on the command line. |
| 306 |
|
| 307 |
/etc/tags, $HOME/.clusterssh/tags |
| 308 |
Very similar to clusters files but the definition is reversed. The |
| 309 |
format is: |
| 310 |
|
| 311 |
<host> <tag> [...] |
| 312 |
|
| 313 |
This allows one host to be specified as a member of a number of |
| 314 |
tags. This format can be clearer than using clusters files. |
| 315 |
|
| 316 |
Extra tag files may be specified either as an option (see |
| 317 |
"tag-file") or within the user's $HOME/.clusterssh/config file (see |
| 318 |
"extra_tag_file" configuration option). |
| 319 |
|
| 320 |
NOTE: All tags are added together |
| 321 |
|
| 322 |
/etc/csshrc & $HOME/.clusterssh/config |
| 323 |
This file contains configuration overrides - the defaults are as |
| 324 |
marked. Default options are overwritten first by the global file, |
| 325 |
and then by the user file. |
| 326 |
|
| 327 |
NOTE: values for entries do not need to be quoted unless it is |
| 328 |
required for passing arguments, e.g. |
| 329 |
|
| 330 |
"terminal_allow_send_events="-xrm '*.VT100.allowSendEvents:true'"" |
| 331 |
|
| 332 |
should be written as |
| 333 |
|
| 334 |
"terminal_allow_send_events=-xrm '*.VT100.allowSendEvents:true'" |
| 335 |
|
| 336 |
auto_close = 5 |
| 337 |
Close terminal window after this many seconds. If set to 0 will |
| 338 |
instead wait on input from the user in each window before |
| 339 |
closing. See also --autoclose and --no-autoclose |
| 340 |
|
| 341 |
auto_quit = 1 |
| 342 |
Automatically quit after the last client window closes. Set to 0 |
| 343 |
to disable. See also --autoquit |
| 344 |
|
| 345 |
auto_wm_decoration_offsets = no |
| 346 |
Enable or disable alternative algorithm for calculating terminal |
| 347 |
positioning. |
| 348 |
|
| 349 |
command_pre = |
| 350 |
command_post = |
| 351 |
Add extra commands around the communication method. For example: |
| 352 |
|
| 353 |
command_pre= . $HOME/virtualenvs/default/bin/active ; |
| 354 |
command_post= | ct |
| 355 |
|
| 356 |
would allow for using Python virtual envronments and then piping |
| 357 |
all shell output through "chromaterm" for syntax highlighting. |
| 358 |
Note: you must use appropriate command separators/terminators to |
| 359 |
keep the meaning of the command pipline (such as ";" and "|" |
| 360 |
between commands). |
| 361 |
|
| 362 |
These are not put through macro parsing. |
| 363 |
|
| 364 |
comms = ssh |
| 365 |
Sets the default communication method (initially taken from the |
| 366 |
name of the program, but can be overridden here). |
| 367 |
|
| 368 |
console_position = <null> |
| 369 |
Set the initial position of the console - if empty then let the |
| 370 |
window manager decide. Format is '+<x>+<y>', i.e. '+0+0' is top |
| 371 |
left hand corner of the screen, '+0-70' is bottom left hand side |
| 372 |
of screen (more or less). |
| 373 |
|
| 374 |
external_command_mode = 0600 |
| 375 |
File mode bits for the external_command_pipe. |
| 376 |
|
| 377 |
external_command_pipe = <null> |
| 378 |
Define the full path to an external command pipe that can be |
| 379 |
written to for controlling some aspects of ClusterSSH, such as |
| 380 |
opening sessions to more clusters. |
| 381 |
|
| 382 |
Commands: |
| 383 |
|
| 384 |
"open <tag|hostname>" - open new sessions to provided tag or |
| 385 |
hostname |
| 386 |
|
| 387 |
"retile" - force window retiling |
| 388 |
|
| 389 |
e.g.: "echo 'open localhost'" /path/to/external_command_pipe >> |
| 390 |
|
| 391 |
external_cluster_command = <null> |
| 392 |
Define the full path to an external command that can be used to |
| 393 |
resolve tags to host names. This command can be written in any |
| 394 |
language. The script must accept a list of tags to resolve and |
| 395 |
output a list of hosts (space separated on a single line). Any |
| 396 |
tags that cannot be resolved should be returned unchanged. |
| 397 |
|
| 398 |
A non-0 exit code will be counted as an error, a warning will be |
| 399 |
printed and output ignored. |
| 400 |
|
| 401 |
If the external command is given a "-L" option it should output |
| 402 |
a list of tags (space separated on a single line) it can resolve |
| 403 |
|
| 404 |
extra_cluster_file = <null> |
| 405 |
Define an extra cluster file in the format of /etc/clusters. |
| 406 |
Multiple files can be specified, separated by commas. Both ~ and |
| 407 |
$HOME are acceptable as a reference to the user's home |
| 408 |
directory, e.g. |
| 409 |
|
| 410 |
"extra_cluster_file = ~/clusters, $HOME/clus" |
| 411 |
|
| 412 |
extra_tag_file = <null> |
| 413 |
Define an extra tag file in the format of /etc/tags. Multiple |
| 414 |
files can be specified, separated by commas. Both ~ and $HOME |
| 415 |
are acceptable as a reference to the user's home directory, e.g. |
| 416 |
|
| 417 |
"extra_tag_file = ~/tags, $HOME/tags" |
| 418 |
|
| 419 |
key_addhost = Control-Shift-plus |
| 420 |
Default key sequence to open AddHost menu. See "KEY SHORTCUTS" |
| 421 |
for more information. |
| 422 |
|
| 423 |
hide_menu = 0 |
| 424 |
If set to 1, hide the menu bar (File, Hosts, Send, Help) in the |
| 425 |
console. |
| 426 |
|
| 427 |
key_clientname = Alt-n |
| 428 |
Default key sequence to send cssh client names to client. See |
| 429 |
"KEY SHORTCUTS" for more information. |
| 430 |
|
| 431 |
key_localname = Alt-l |
| 432 |
Default key sequence to send hostname of local server to client. |
| 433 |
See "KEY SHORTCUTS" for more information. |
| 434 |
|
| 435 |
key_paste = Control-v |
| 436 |
Default key sequence to paste text into the console window. See |
| 437 |
"KEY SHORTCUTS" for more information. |
| 438 |
|
| 439 |
key_quit = Control-q |
| 440 |
Default key sequence to quit the program (will terminate all |
| 441 |
open windows). See "KEY SHORTCUTS" for more information. |
| 442 |
|
| 443 |
key_retilehosts = Alt-r |
| 444 |
Default key sequence to retile host windows. See "KEY SHORTCUTS" |
| 445 |
for more information. |
| 446 |
|
| 447 |
key_username = Alt-u |
| 448 |
Default key sequence to send username to client. See "KEY |
| 449 |
SHORTCUTS" for more information. |
| 450 |
|
| 451 |
key_user_1 = Alt-1 |
| 452 |
key_user_2 = Alt-2 |
| 453 |
key_user_3 = Alt-3 |
| 454 |
key_user_4 = Alt-4 |
| 455 |
Default key sequence to send user defined macros to client. If |
| 456 |
the matching macro_user_1 macro is undefined, the sequence is |
| 457 |
passed straight to the terminal. See "KEY SHORTCUTS" for more |
| 458 |
information. |
| 459 |
|
| 460 |
macro_servername = %s |
| 461 |
macro_hostname = %h |
| 462 |
macro_username = %u |
| 463 |
macro_newline = %n |
| 464 |
macro_version = %v |
| 465 |
macro_user_1 = %1 |
| 466 |
macro_user_2 = %2 |
| 467 |
macro_user_3 = %3 |
| 468 |
macro_user_4 = %4 |
| 469 |
Change the replacement macro used when either using a 'Send' |
| 470 |
menu item, or when pasting text into the main console. |
| 471 |
|
| 472 |
macro_user_1_command = |
| 473 |
macro_user_2_command = |
| 474 |
macro_user_3_command = |
| 475 |
macro_user_4_command = |
| 476 |
User defined macros - the macro is run through the shell on the |
| 477 |
server and the output is sent to the client. For example, |
| 478 |
|
| 479 |
"macro_user_1_command=echo echo macro_user_1" |
| 480 |
|
| 481 |
would send the text C<echo macro_user_1> into the terminal session. |
| 482 |
|
| 483 |
"macro_user_1_command=env | grep CSSH" |
| 484 |
|
| 485 |
would send the CSSH environment variables to the client. |
| 486 |
|
| 487 |
The following environment variables are set in the shell of the |
| 488 |
macro process |
| 489 |
|
| 490 |
"CSSH_SERVERNAME" |
| 491 |
"CSSH_HOSTNAME" |
| 492 |
"CSSH_USERNAME" |
| 493 |
"CSSH_CONNECTION_STRING" |
| 494 |
"CSSH_CONNECTION_PORT" |
| 495 |
"CSSH_VERSION" |
| 496 |
|
| 497 |
macros_enabled = yes |
| 498 |
Enable or disable macro replacement. Note: this affects all the |
| 499 |
"macro_*" variables above. |
| 500 |
|
| 501 |
max_addhost_menu_cluster_items = 6 |
| 502 |
Maximum number of entries in the 'Add Host' menu cluster list |
| 503 |
before scrollbars are used |
| 504 |
|
| 505 |
max_host_menu_items = 30 |
| 506 |
Maximum number of hosts to put into the host menu before |
| 507 |
starting a new column |
| 508 |
|
| 509 |
menu_host_autotearoff = 0 |
| 510 |
menu_send_autotearoff = 0 |
| 511 |
When set to non-0 will automatically tear-off the host or send |
| 512 |
menu at program start |
| 513 |
|
| 514 |
mouse_paste = Button-2 (middle mouse button) |
| 515 |
Default key sequence to paste text into the console window using |
| 516 |
the mouse. See "KEY SHORTCUTS" for more information. |
| 517 |
|
| 518 |
rsh = /path/to/rsh |
| 519 |
ssh = /path/to/ssh |
| 520 |
telnet = /path/to/telnet |
| 521 |
Set the path to the specific binary to use for the communication |
| 522 |
method, else uses the first match found in $PATH |
| 523 |
|
| 524 |
rsh_args = <blank> |
| 525 |
ssh_args = "-x -o ConnectTimeout=10" |
| 526 |
telnet_args = <blank> |
| 527 |
Sets any arguments to be used with the communication method |
| 528 |
(defaults to ssh arguments). |
| 529 |
|
| 530 |
NOTE: The given defaults are based on OpenSSH, not commercial |
| 531 |
ssh software. |
| 532 |
|
| 533 |
NOTE: Any "generic" change to the method (e.g., specifying the |
| 534 |
ssh port to use) should be done in the medium's own config file |
| 535 |
(see "ssh_config" and $HOME/.ssh/config). |
| 536 |
|
| 537 |
screen_reserve_top = 0 |
| 538 |
screen_reserve_bottom = 60 |
| 539 |
screen_reserve_left = 0 |
| 540 |
screen_reserve_right = 0 |
| 541 |
Number of pixels from the screen's side to reserve when |
| 542 |
calculating screen geometry for tiling. Setting this to |
| 543 |
something like 50 will help keep cssh from positioning windows |
| 544 |
over your window manager's menu bar if it draws one at that side |
| 545 |
of the screen. |
| 546 |
|
| 547 |
terminal = /path/to/xterm |
| 548 |
Path to the X-Windows terminal used for the client. |
| 549 |
|
| 550 |
terminal_args = <blank> |
| 551 |
Arguments to use when opening terminal windows. Otherwise takes |
| 552 |
defaults from $HOME/.Xdefaults or $HOME/.Xresources file. |
| 553 |
|
| 554 |
terminal_chdir = 0 |
| 555 |
When non-0, set the working directory for each terminal as per |
| 556 |
'terminal_chdir_path' |
| 557 |
|
| 558 |
terminal_chdir_path = $HOME/.clusterssh/work/%s |
| 559 |
Path to use as working directory for each terminal when |
| 560 |
'terminal_chdir' is enabled. The path provided is passed through |
| 561 |
the macro parser (see the section above on 'macros_enabled'. |
| 562 |
|
| 563 |
terminal_font = 6x13 |
| 564 |
Font to use in the terminal windows. Use standard X font |
| 565 |
notation. |
| 566 |
|
| 567 |
terminal_reserve_top = 5 |
| 568 |
terminal_reserve_bottom = 0 |
| 569 |
terminal_reserve_left = 5 |
| 570 |
terminal_reserve_right = 0 |
| 571 |
Number of pixels from the terminal's side to reserve when |
| 572 |
calculating screen geometry for tiling. Setting these will help |
| 573 |
keep cssh from positioning windows over your scroll and title |
| 574 |
bars or otherwise overlapping the windows too much. |
| 575 |
|
| 576 |
terminal_colorize = 1 |
| 577 |
If set to 1 (the default), then "-bg" and "-fg" arguments will |
| 578 |
be added to the terminal invocation command-line. The terminal |
| 579 |
will be colored in a pseudo-random way based on the host name; |
| 580 |
while the color of a terminal is not easily predicted, it will |
| 581 |
always be the same color for a given host name. After a while, |
| 582 |
you will recognize hosts by their characteristic terminal color. |
| 583 |
|
| 584 |
terminal_bg_style = dark |
| 585 |
If set to "dark", the terminal background will be set to black |
| 586 |
and the foreground to the pseudo-random color. If set to |
| 587 |
"light", then the foreground will be black and the background |
| 588 |
the pseudo-random color. If terminal_colorize is "zero", then |
| 589 |
this option has no effect. |
| 590 |
|
| 591 |
terminal_size = 80x24 |
| 592 |
Initial size of terminals to use. NOTE: the number of lines (24) |
| 593 |
will be decreased when resizing terminals for tiling, not the |
| 594 |
number of characters (80). |
| 595 |
|
| 596 |
terminal_title_opt = -T |
| 597 |
Option used with "terminal" to set the title of the window |
| 598 |
|
| 599 |
terminal_allow_send_events = -xrm '*.VT100.allowSendEvents:true' |
| 600 |
Option required by the terminal to allow XSendEvents to be |
| 601 |
received |
| 602 |
|
| 603 |
title = cssh |
| 604 |
Title of windows to use for both the console and terminals. |
| 605 |
|
| 606 |
unmap_on_redraw = no |
| 607 |
Tell Tk to use the UnmapWindow request before redrawing terminal |
| 608 |
windows. This defaults to "no" as it causes some problems with |
| 609 |
the FVWM window manager. If you are experiencing problems with |
| 610 |
redraws, you can set it to "yes" to allow the window to be |
| 611 |
unmapped before it is repositioned. |
| 612 |
|
| 613 |
use_all_a_records = 0 |
| 614 |
If a hostname resolves to multiple IP addresses, set to 1 to |
| 615 |
connect to all of them, not just the first one found. See also |
| 616 |
"--use-all-a-records"} |
| 617 |
|
| 618 |
use_hotkeys = 1 |
| 619 |
Setting to 0 will disable all hotkeys. |
| 620 |
|
| 621 |
use_natural_sort = 0 |
| 622 |
Windows will normally sort in alphabetical order, i.e.: host1, |
| 623 |
host11, host2. Setting to this 1 will change the sort order, |
| 624 |
i.e.: host1, host2, host11. NOTE: You must have the perl module |
| 625 |
Sort::Naturally installed. |
| 626 |
|
| 627 |
user = $LOGNAME |
| 628 |
Sets the default user for running commands on clients. |
| 629 |
|
| 630 |
window_tiling = 1 |
| 631 |
Perform window tiling (set to 0 to disable) |
| 632 |
|
| 633 |
window_tiling_direction = right |
| 634 |
Direction to tile windows, where "right" means starting top left |
| 635 |
and moving right and then down, and anything else means starting |
| 636 |
bottom right and moving left and then up |
| 637 |
|
| 638 |
NOTE: The key shortcut modifiers must be in the form "Control", |
| 639 |
"Alt" or "Shift", e.g. with the first letter capitalised and the |
| 640 |
rest lower case. Keys may also be disabled individually by setting |
| 641 |
to the word "null". |
| 642 |
|
| 643 |
$HOME/.clusterssh/send_menu |
| 644 |
This (optional) file contains items to populate the send menu. The |
| 645 |
default entry could be written as: |
| 646 |
|
| 647 |
<send_menu> |
| 648 |
<menu title="Use Macros"> |
| 649 |
<toggle/> |
| 650 |
<accelerator>ALT-p</accelerator> |
| 651 |
</menu> |
| 652 |
<menu title="Remote Hostname"> |
| 653 |
<command>%s</command> |
| 654 |
<accelerator>ALT-n</accelerator> |
| 655 |
</menu> |
| 656 |
<menu title="Local Hostname"> |
| 657 |
<command>%s</command> |
| 658 |
<accelerator>ALT-l</accelerator> |
| 659 |
</menu> |
| 660 |
<menu title="Username"> |
| 661 |
<command>%u</command> |
| 662 |
<accelerator>ALT-u</accelerator> |
| 663 |
</menu> |
| 664 |
<menu title="Test Text"> |
| 665 |
<command>echo "ClusterSSH Version: %v%n</command> |
| 666 |
</menu> |
| 667 |
</send_menu> |
| 668 |
|
| 669 |
Submenus can also be specified as follows: |
| 670 |
|
| 671 |
<send_menu> |
| 672 |
<menu title="Default Entries"> |
| 673 |
<detach>yes</detach> |
| 674 |
<menu title="Hostname"> |
| 675 |
<command>%s</command> |
| 676 |
<accelerator>ALT-n</accelerator> |
| 677 |
</menu> |
| 678 |
</menu> |
| 679 |
</send_menu> |
| 680 |
|
| 681 |
Caveats: |
| 682 |
|
| 683 |
There is currently no strict format checking of this file. |
| 684 |
The format of the file may change in the future |
| 685 |
If the file exists, the default entry (Hostname) is not added |
| 686 |
|
| 687 |
The following replacement macros are available (note: these can be |
| 688 |
changed in the configuration file): |
| 689 |
|
| 690 |
%s Hostname part of the specific connection string to each client, |
| 691 |
minus any username or port |
| 692 |
|
| 693 |
%u Username part of the connection string to each client |
| 694 |
|
| 695 |
%h Hostname of server where cssh is being run from |
| 696 |
|
| 697 |
%n "RETURN" code |
| 698 |
|
| 699 |
NOTE: requires XML::Simple to be installed |
| 700 |
|
| 701 |
KNOWN BUGS |
| 702 |
If you have any ideas about how to fix the below bugs, please get in |
| 703 |
touch and/or provide a patch. |
| 704 |
|
| 705 |
* Swapping virtual desktops can cause a redraw of all the terminal |
| 706 |
windows. This is due to a lack of distinction within Tk between |
| 707 |
switching desktops and minimising/maximising windows. Until Tk can |
| 708 |
tell the difference between the two events, there is no fix (apart |
| 709 |
from rewriting everything directly in X). |
| 710 |
|
| 711 |
TROUBLESHOOTING |
| 712 |
If you have issues running cssh, first try: |
| 713 |
|
| 714 |
"cssh -e [user@]<hostname>[:port]" |
| 715 |
|
| 716 |
This performs two tests to confirm cssh is able to work properly with |
| 717 |
the settings provided within the $HOME/.clusterssh/config file (or |
| 718 |
internal defaults). |
| 719 |
|
| 720 |
1 Test the terminal window works with the options provided |
| 721 |
|
| 722 |
2 Test ssh works to a host with the configured arguments |
| 723 |
|
| 724 |
Configuration options to watch for in ssh are: |
| 725 |
|
| 726 |
* SSH doesn't understand "-o ConnectTimeout=10" - remove the option |
| 727 |
from the $HOME/.clusterssh/config file |
| 728 |
|
| 729 |
* OpenSSH-3.8 using untrusted ssh tunnels - use "-Y" instead of "-X" |
| 730 |
or use "ForwardX11Trusted yes" in $HOME/.ssh/ssh_config (if you |
| 731 |
change the default ssh options from "-x" to "-X") |
| 732 |
|
| 733 |
SUPPORT AND REPORTING BUGS |
| 734 |
A web site for comments, requests, bug reports and bug fixes/patches is |
| 735 |
available at: <https://github.com/duncs/clusterssh> |
| 736 |
|
| 737 |
If you require support, please run the following commands and create an |
| 738 |
issue via: <https://github.com/duncs/clusterssh/issues> |
| 739 |
|
| 740 |
"perl -V" |
| 741 |
|
| 742 |
"perl -MTk -e 'print $Tk::VERSION,$/'" |
| 743 |
|
| 744 |
"perl -MX11::Protocol -e 'print $X11::Protocol::VERSION,$/'" |
| 745 |
|
| 746 |
"cat /etc/csshrc $HOME/.clusterssh/config" |
| 747 |
|
| 748 |
Using the debug option (--debug) will turn on debugging output. Repeat |
| 749 |
the option to increase the amount of debug. However, if possible please |
| 750 |
only use this option with one host at a time, e.g. "cssh --debug <host>" |
| 751 |
due to the amount of output produced (in both main and child windows). |
| 752 |
|
| 753 |
SEE ALSO |
| 754 |
<https://github.com/duncs/clusterssh/wiki/>, "ssh", Tk::overview, |
| 755 |
X11::Protocol, "perl" |
| 756 |
|
| 757 |
AUTHOR |
| 758 |
Duncan Ferguson, "<duncan_j_ferguson at yahoo.co.uk>" |
| 759 |
|
| 760 |
LICENSE AND COPYRIGHT |
| 761 |
Copyright 1999-2018 Duncan Ferguson. |
| 762 |
|
| 763 |
This program is free software; you can redistribute it and/or modify it |
| 764 |
under the terms of either: the GNU General Public License as published |
| 765 |
by the Free Software Foundation; or the Artistic License. |
| 766 |
|
| 767 |
See http://dev.perl.org/licenses/ for more information. |
| 768 |
|