PSSH automatic operation and maintenance

Source: Internet
Author: User

we usually manage several servers, we can use SSH this simple and efficient management tool remote login to manage, let our work become easy, fast, however, if you want to manage hundreds of thousands of units? Even with a quick and easy tool like SSH, it can make people feel headaches, so is there a management tool that can manage N servers at the same time?

The answer, of course, is yes, and then we'll introduce a batch management tool that has a kindred vein with SSH.


PSSH is a tool that can execute commands on multiple servers while supporting the copying of files, which is an excellent management software in the same kind of tool.

* Note: To use PSSH, you must configure the key authentication access on each server!!!

Next we will deploy this environment, one to experience it!!!

Download the installation:

Wget; CD pssh-1.4.3

Python Install

The installation is complete, is it simple?

If the following error occurs with Python install

650) this.width=650; "src=" "title=" 01.png "alt=" Wkiol1xwb1fdegsmaagpp_9wjky585.jpg "/>

Please do not worry, this error is due to Python does not install setuptools This module, this is a third-party module, just download the installation can

650) this.width=650; "src=" "title=" 02.png "alt=" Wkiol1xwckhxnpqraasagl74zle466.jpg "/>

If an error occurs, simply add the--no-check-certificate, as follows

wget --no-check-certificate  

Tar zxvf setuptools-0.6c11.tar.gz
python build
python Install

and then jump back to pssh-1.4.3 Execute python install, complete

Environment deployment is complete, next we will learn how to use the

PSSH Package Installation 5 Utilities :

Pssh runs commands in parallel on multiple hosts.

The PSCP copies files to multiple hosts in parallel.

The Prsync effectively replicates files to multiple hosts in parallel through the Rsync protocol.

The pslurp copies files from multiple remote hosts to the central host in parallel.

Pnuke kills processes on multiple remote hosts in parallel

PSSH Related parameters:

Pssh running commands in parallel on multiple hosts

- H executes the command's list of remote hosts, file content format [[email protected]]host[:p ORT]

such as [email protected]:229

- H execute command host, host format [email protected]:p ORT

The user name of the- L remote machine

- P One-time maximum allowable number of connections

- p output execution information at execution time

- o output Redirect to a file

- e execution error redirected to a file

- t set command execution time-out

-A prompts for the password and passes the password to SSH (this parameter is also used if the private key also has a password)

- o set some options for SSH

- x set SSH additional parameters, can be multiple, separate the space between the parameters

- x with-X, but only one parameter can be set

-I displays standard output and standard errors after each host has finished executing

Remote execution:

Pssh-i-H list.txt ' df-h '

This article is from the "Ride a Pig to Travel" blog, please be sure to keep this source

PSSH automatic operation and maintenance

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: 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.