Linux cluster management tool pssh batch server management

Source: Internet
Author: User
If you have multiple servers and one server is logged on for management, it cannot be said, so the batch management tools have emerged. If you have set SSH password-less logon: ssh-keygen-trsassh-copy-iduser @ host distribute the key to the responding host

If you have multiple servers and one server is logged on for management, it cannot be said, so the batch management tools have emerged. If you have set SSH password-less logon:

ssh-keygen -t rsassh-copy-id user@host

By distributing the key to the responding host, you can achieve ssh login and operations without a password.

Pssh is written in Python. before running it, make sure that the Python environment is installed on the machine.

Use wget to download, compile, and install:

wget http://parallel-ssh.googlecode.com/files/pssh-2.3.1.tar.gz

Extract

tar xvf pssh-2.3.1.tar.gz

Install

python setup.py install

Introduction to pssh

-H: The list of remote hosts or-H user @ ip: port file content in the format of [user @] host [: port]-l remote machine username-p maximum number of connections allowed at a time-o output content redirected to a file-e execution error redirected to a file-t set command execution timeout- A prompts you to enter the password and pass it to ssh-O to set the specific configuration of ssh parameters, refer to the ssh_config configuration file-x to pass multiple SSH commands. Separate multiple commands with spaces, enclosed in quotation marks-X is the same as-x, but only one command can be passed at a time.-I indicates that standard output and standard errors are displayed. after each host is executed,-I reads each input command, and passed to the ssh process to allow the command script to be transmitted to the standard input.
The other command pscp in the package transfers files to multiple hosts. its features are similar to scp. pslurp copies files from multiple remote machines. pnuke kill the process of remote machines.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.