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
8
votes
2 answers

What does '^@' mean in vim?

When I cat a file in bash I get the following: $ cat /tmp/file microsoft When I view the same file in vim I get the following: ^@m^@i^@c^@r^@o^@s^@o^@f^@t^@ How can I identify and remove these "non-printable" characters. What does '^@' mean in…
murungu
  • 2,090
  • 4
  • 21
  • 45
4
votes
2 answers

How to use "%" character in sql query on linux shell?

I am trying to pull all the jdk packages installed on set of hosts by sending a sql select statement to osquery on linux shell via pssh . Here is the query: pssh -h myhosts -i 'echo "SELECT name FROM rpm_packages where name like '%jdk%';"| osqueryi…
chetan honnavile
  • 398
  • 1
  • 6
  • 19
2
votes
1 answer

Cassandra global snapshot

I am running a cluster with 3 nodes(EC2 instances) and replication factor=2. I execute a script from the first node which runs nodetool snapshot on all the nodes using pssh (parallel-ssh) utility. But the snapshot data for each node gets stored on…
aryan
  • 133
  • 2
  • 8
2
votes
2 answers

How to use parallel on multiple computer to have a list of tasks done only once?

I am trying to use parallel on multiple server using ssh, what actually I would like to do is something like: parallel -s computer_list.txt < command.txt where in server_list.txt there is list of server and in command.txt looks like …
2
votes
1 answer

PSSH private key issue

I'm new to PSSH. I followed the PSSH document to write the script. When I use Private key, it returns with the error "ImportError: No module named ecdsakey" I tried downloading that module but there is no "ecdsakey" modul,the module available is…
user7369931
  • 193
  • 1
  • 11
1
vote
1 answer

ModuleNotFoundError: No module named 'pssh'

I am using python3.9 and I got the following error: ModuleNotFoundError: No module named 'pssh' on trying to use the library as follows: - from pssh.clients import ParallelSSHClient. I tried installing pssh as follows: - pip install pssh (inside a…
Prabhatika Vij
  • 305
  • 3
  • 15
1
vote
0 answers

Issues using pssh -I option in bash script

I'm trying to use the -I option of pssh (parallel ssh) in a bash script and am having difficulties. This option should allow you to execute a script on your local machine on a remote machine. I've tried doing a very simple one for testing but…
1
vote
1 answer

parallel ssh (pssh) with output stream

I have 3 servers and I want to run a command on all of them parallely from a client and see the output as it streams. I have tried using pssh but it shows output only when the command exits. But what I want is the output from all the servers on the…
MeV
  • 11
  • 4
1
vote
0 answers

Error when decrypting Widevine PSSH using protobuf

I am trying to parse Widevine PSSH data and read its content. This is a PSSH data example taken from https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd…
mbbf
  • 21
  • 3
1
vote
2 answers

Python Parallel SSH get only command output

I'm new to Python and i'm looking to run multiple parallel ssh connections and commands to the devices. I'm using pssh link for it. Issue is the device returns some big header after the connection like 20-30 lines. When i use the below code what is…
LefterisL
  • 1,132
  • 3
  • 17
  • 37
1
vote
1 answer

PSSH directly to directory

I am trying to PSSH to multiple hosts, but instead of going to the home directory, i would like to go directly into a particular directory. Can anyone help me with how to do this? I have searched quite a lot for this, but without much luck. At the…
mkumar118
  • 442
  • 5
  • 12
0
votes
0 answers

How to set up PlayReady(and Widevine) PSSH when applying DRM to the Google Cloud Live Stream API

https://cloud.google.com/livestream/docs/reference/drm#encryptionkey According to the documentation in the link above, there is no direct way to set up PSSH for PlayReady and Widevine when applying DRM to a stream from the GCP Live Stream API. The…
jason
  • 3
  • 1
0
votes
0 answers

python pssh show "Authentication error" in chromebook

I have been try below code (python and pssh) on ubuntu and chromeos (chromebook), but only chromeos show "AuthenticationError()". I can ssh to both ubuntu and chromeos by putty or ssh in linux by manually. And I found when I ssh to chromeos by…
kyc1109
  • 151
  • 1
  • 7
0
votes
0 answers

How pssh runs local files with arguments

I have a requirement to go to multiple servers and execute several commands, and I thought of using pssh, which I would like to encapsulate in a script, but it doesn't seem to work # script.sh cmd1(){ command2 $1 $2 } cmd2(){ command2…
moluzhui
  • 1,003
  • 14
  • 34
0
votes
1 answer

Using pssh to replace text in place

Anyone here used pssh to modify files in place, I've tried attempts like so; while read line; do pssh --inline-stdout -H "$line" "hostname; sudo sed -i \'s/search domain123.local/search domain123.local domain456.local/g\' /etc/resolv.conf; sleep…
CiCa
  • 141
  • 2
  • 13
1
2 3