Inactive

Project Summary

  Analyzed 9 days ago based on code collected 9 days ago.

SSHBatch is a powerful tool to control several hosts simultaneously. It simplifies ssh login phase, applied to situations such as bench marking, cluster management well.

1. InstallationDownload SSHBatch-{version}.tar.gz, uncompress it, change to uncompressed directory, run the following command to install:

# python setup.py installYou need root permission to execute above command.

Edit configuration file /usr/local/etc/sshbatch.conf, seeking for help from in-palce comments in that file. Copying it to your home directory and renaming it as .sshbatch.conf is recommended.

To execute sshbatch, just type:

# sshbatch2. Execution modesThere are four execution modes:

- global No default operation target. After launching sshbatch, you are in global mode
- cluster Hosts defined in cluster are default operating targets
- host Host switched to is default operating target
- ssh Same as host mode, but output from ssh is real timeCommands to switch among execution modes:

Enter global mode: global
Enter cluster mode: cluster {cluster-name}
Enter host mode: host {host-name}
Enter ssh mode: ssh [{host-name}]If you want to switch from host mode to ssh mode, only typing 'ssh' is enough, parameter {host-name} is optional.

To switch from ssh mode to other modes, you need precede mode changing command with sshbatch identity configured in configuration file through 'sshbatchid' option. For example, if you configured sshbatchid as ssb, then to switch from ssh mode to global mode, you need type

ssb global3. Command referenceglobal Change to global mode [G|C|H|S]
cluster {cluster} Change to cluster mode [G|C|H|S]
host {host} Change to host mode [G|C|H|S]
ssh [{host}] Change to ssh mode [G|C|H|S]

connect [{host} ...] Open ssh connection [G|C|H|S]
disconnect [{host} ...] Close ssh connection [G|C|H|S]
kcontrol {char} Send key ^-{char} to ssh connection [C|H|S]
keof [{host} ...] Send key EOF to ssh connection [G|C|H|S]
focus [{host}] Set focus on host or stop focusing [G|C|H]

capture [{host}] Capture output of ssh into buffer or stop capturing [G|C|H]
show buffer [{buf-no}]Display content of buffer [G|C|H]
edit %{buf-no}|fpath Edit content of buffer or a local file [G|C|H]
transmit %{buf-no}|{fpath} Transmit buffer or local file to ssh [C|H]
load fpath Load local file into buffer [G|C|H]
delete {buf-no} Discard buffer [G|C|H]

run {string} Send string to ssh connection with NL [C|H|S]
send {string} Send string to ssh connection without NL [C|H|S]
hrun host {string} Send string to host ssh connection with NL [G|C|H|S]
hsend host {string} Send string to host ssh connection without NL [G|C|H|S]

last [{num-lines}] Show last output lines of ssh connection [C|H|S]
reply password Send configured password to ssh connection [C|H|S]
show running|config Get sshbatch information [G|C|H|S]
history [{num-lines}] Show command history [G|C|H|S]
help Print this screen [G|C|H|S]
quit Quit [G|C|H|S]
!command Run command locally [G|C|H|S]

Usable Modes: [G]lobal [C]luster [H]ost [S]sh4. Tips- If readline module is installed, type 'tab' to complete command, otherwise functions such as command completion and command history are not usable.

- In cluster and host mode type Enter to display last output lines from ssh.

- In ssh mode a blank screen (when no output from ssh available) maybe confuse you very much, you can change to other mode by typing sshbatch identity followed by mode changing command.

- If you want to edit a remote file, you need to set capture on, 'cat' that file, stop capturing, remote file would be saved into local buffer, edit that buffer, executing 'cat' command on remote hosts, transmit buffer to remote hosts, finally send eof to remote hosts.

- You need only typing two characters of command to avoid ambiguous command error.

5. Feed backSSHBatch is licensed under GPL v3, you can contact the author by email:

Yingyuan Cheng

Visit http://www.devfront.com/?q=node/307 for chinese translation.

Share

In a Nutshell, sshbatch...

 

Activity

30 Day Summary Apr 16 2013 — May 16 2013

12 Month Summary May 16 2012 — May 16 2013

Community

Ratings

Be the first to rate this project
 
Click to add your rating
 
Review this Project!
 
 
 

Creative Commons License Copyright © 2013 Black Duck Software, Inc. and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a Creative Commons Attribution 3.0 Unported License . Ohloh ® and the Ohloh logo are trademarks of Black Duck Software, Inc. in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.