Questions tagged [pssh]

Parallel SSH or PSSH, allows to execute commands on multiple linux hosts in parallel at the same time.

From the Linux HowTo guide:

OpenSSH is one of the most widely used and powerful tool available for Linux, that allows you to connect securely to remote Linux systems via a shell and allows you to transfer files securely to and from remote systems.

But the biggest disadvantages of OpenSSH is that, you cannot execute same command on multiple hosts at one go and OpenSSH is not developed to perform such tasks. This is where Parallel SSH or PSSH tool comes in handy, is a python based application, which allows you to execute commands on multiple hosts in parallel at the same time.

GitHub

31 questions
0
votes
0 answers

Execute Python script from network share to windows system through pssh

there is python script in mounted network location (K:/temp/abc.py) in host (Host-01) I am trying to ssh Host-01 from My PC but this is not working. Although simple commands like 'whoami' are working. I tried giving full path as well…
0
votes
1 answer

how to python pssh with smash clp

I'm trying to automate getting the status of 500 servers. I can ssh into the server bmc console which brings up a smash clp terminal using a valid username and password and run the command: chassis --get power status and this returns on screen: The…
kaminsknator
  • 1,135
  • 3
  • 15
  • 26
0
votes
0 answers

pssh on mac 10.14 "Command not specified"

I have installed pssh 2.3.1 on my mac mojave 10.14 brew install pssh pssh --version 2.3.1 pssh --help also works fine. But when I try this: pssh -H "10.65.8.50 10.65.8.45" -l dev Usage: pssh [OPTIONS] command [...] pssh: error: Command not…
klind
  • 855
  • 2
  • 21
  • 33
0
votes
1 answer

How to use the lsof command using pssh/fabric library? Bash: lsof command not found

Lsof: Bash command not found while connecting to remote server. The same works on the terminal perfectly. I've tried to work with three of these libraries for ssh in python: pssh, fabric and paramiko. The main error is that with the pssh and fabric…
Lipsa
  • 9
  • 2
0
votes
0 answers

Unable to fetch line from crontab -l via pssh command

I have a file /tmp/hostlist containing hosts 1000+ . I am trying to fetch line which has particular word from crontab -l on 1000+ hosts via pssh command to expedite the task, but unable to fetch the line I am trying below command. The reason for…
Jack15
  • 19
  • 4
0
votes
1 answer

How to append stderr in same line

I am trying to execute OS cmds on multiple host using via pssh. The problem is stderr is not printing in same line. I am managed to print cmd output in same line but not stderr. 55 Stderr: ssh: Could, not, not known [2] 04:58:09 [], host2,…
0
votes
1 answer

PSSH command with different arguments to multiple hosts

I'm trying to write a bash script using PSSH which sends the same command but different arguments depending on the host. The host name and arguments will be pulled from a different file 'list.txt'. An example of a 'list.txt' file would look like…
0
votes
1 answer

why pssh command not working when sudo user?

Below is one of the part of my script, but I am struggling to get the solution. I am using pssh command along with awk to filter particular column from user input OS command. awk with pssh command only having an issue when sudo to any user. Below…
Sin15
  • 23
  • 7
0
votes
1 answer

Open/Activate an closed Application on a remote machine through pssh in Mac os10.12.6

I was trying to open an application remotely using below command, but I get an error pssh -h node.txt -O StrictHostKeyChecking=no -l mapsadmin -i "open /Applications/FusionX.app" Below is error: Stderr: LSOpenURLsWithRole() failed with error…
aizaz187
  • 1
  • 1
0
votes
1 answer

how to run multiple command in single line pssh?

I want to run multiple command like command1, command2 , command3 in single line how to do? i tried following pssh -Pi --user XXXX -h host.txt -x "-oStrictHostKeyChecking=no" ls date i am getting following error Stderr: ls: cannot access date: No…
Mahesh Hegde
  • 1,131
  • 10
  • 12
0
votes
0 answers

Parallel SSH sending inverted commas when running command

Been at this a few days now and haven't been able to resolve, im sure its something im doing stupidly! When I use the following command for a Mikrotik Router: from __future__ import print_function from pssh.pssh_client import…
James
  • 1
  • 2
0
votes
1 answer

General SSH error - Error reading SSH protocol banner

I'm writing a python UI in kivy to manage some remote machines with fabric. As I can't use fabric's parallel implementation on Windows 10 (see here), I was hoping to use parallel-ssh to actually perform the parallel remote operations. This issue…
Dave Reece
  • 35
  • 8
0
votes
1 answer

pass the password as an argument in pssh

I am trying to write a script which will run commands on multiple machines with pssh. Is there any way to pass the password also in the same command line like below: $ pssh -h pssh-host.txt -l root -A "pswd" echo "hi" Warning: do not enter your…
user5154816
0
votes
2 answers

Getting "TypeError: 'NoneType' object is not iterable" while doing parallel ssh

I am trying to do parallel ssh on servers. While doing this, i am getting "TypeError: 'NoneType' object is not iterable" this error. Kindly help. My script is below from pssh import ParallelSSHClient from pssh.exceptions import…
0
votes
1 answer

Installing parallel-ssh on python2.7

I am trying to install parallel-ssh on python2.7. My use-case for using this is to make an ssh connection run in parallel and not let it block further execution of a python file. I used the following command, pip install parallel-ssh But, I am…
nidHi
  • 833
  • 3
  • 10
  • 21