Changeset 418
- Timestamp:
- Nov 24, 2019, 10:17:36 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tssh/tssh
r417 r418 341 341 # Clean temporary folder 342 342 [ -d "/tmp/${base_path}" ] && rm -rf "/tmp/${base_path}" 343 344 345 exit 346 347 348 ################################################################ 349 # Documentation in POD format (like Perl) 350 ################################################################ 351 352 =head1 NAME 353 354 tssh - tmux cluster ssh 355 356 =head1 SYNOPSIS 357 358 tssh [-w number] [-f] [-v] [-p] [-c remote_cmd] [-o ssh_option] <host1> <host2> <clusterssh class>... <hostM>- <hostN>+ 359 360 =head1 OPTIONS 361 362 =over 363 364 =item C<-w number> windows to open (integer, default 16) 365 366 =item C<-o ssh_option> option to pass to ssh 367 368 =item C<-f> fast, no nmap scan to eliminate sleeping computer 369 370 =item C<-v> verbose 371 372 =item C<-c remote_cmd> launch the remote command on hosts and exit 373 374 =item C<-p> launch in parallel (only with option C<-c>) with command parallel or xargs 375 376 =item C<-h> help 377 378 =back 379 380 =head1 DESCRIPTION 381 382 tssh can be use to launch terminal on many computer in parallel with tmux 383 multiplexer and ssh. 384 The tmux windows is splitted automatically. 385 If you need more computers on the same windows, you can zoom in and out 386 under gnome terminal with Ctrl- or Ctrl+. 387 This must be done before launching tssh. 388 389 On the command line, you can put C<host>, C<login@host>, C<clusterssh class>. 390 A host or a class can be remove from the list with a dash append 391 and force to be in this one with a plus append. 392 Example with the cluster ssh config below: 393 394 tssh all team- node005 laptop04+ 395 396 Is equivalent to: 397 398 tssh srv-mail srv-dns srv-imap srv-web srv-proxy \\ 399 node001 node002 node003 node004 \\ 400 node101 node102 node103 node104 \\ 401 node005 laptop04 402 403 The control command for C<tmux> is C<Ctrl^b>. 404 You can switch from broadcast to a local machine with C<Ctrl^b Ctrl^b> 405 and move between machine with C<Ctrl^b ArrowKey>. 406 407 =head1 DEPENDS 408 409 On Debian, you need the package 410 411 apt-get install tmux ncurses-bin wamerican nmap 412 413 C<wamerican> (or C<wfrench>...) is used to choose a random word in the file F</usr/share/dict/words> 414 for each new tmux session. 415 416 C<ncurses-bin> is required for the C<tput> command 417 to automatically split your terminal into several small panels. 418 C<nmap> is only used for dynamic DNS domain and dynamic scan. 419 This is not mandatory for general use. 420 421 By default, C<tssh> use C<tput> to know the number of columns and lines of your terminal. 422 It takes 10 lines and 40 columns for each windows by default. 423 If C<tput> is not installed, the default is 16 windows... 424 425 =head1 CONFIGURATION 426 427 The clusterssh config file F<~/.csshrc> is a key values file. 428 The "clusters" is mandatory for clusterssh (not tssh) and define the other keys. 429 Values could be computer list or other key... 430 431 clusters = all server s1 s2 s3 node n1 n2 team switch 432 all = server node team 433 server = s1 s2 434 node = n1 n2 435 s1 = srv-mail srv-dns srv-imap 436 s2 = srv-web srv-proxy 437 n1 = node001 node002 node003 node004 438 n2 = node101 node102 node103 node104 439 team = pc01 pc06 laptop04 laptop05 laptop09 440 switch = root@switch01 root@switch05 root@switch17 441 442 The C<tssh> config file (F<~/.tsshrc>) can be use change the default parameters. 443 444 #export split_number=16 445 export dyn_domain='mycompagny.local' 446 #export ssh_option='' 447 #export fast='yes' 448 #export verbose='yes' 449 450 =head1 SEE ALSO 451 452 cluster-ssh, cssh, xargs, parallel, tmux 453 454 =head1 AUTHORS 455 456 Written by Gabriel Moreau, Grenoble - France 457 458 =head1 COPYRIGHT 459 460 Copyright (C) 2014-2019, LEGI UMR 5519 / CNRS UGA G-INP, Grenoble, France 461 Licence : GNU GPL version 2 or later
Note: See TracChangeset
for help on using the changeset viewer.