Updated: 28 September 2026 · Applies to: Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9

Parallel SSH (pssh) runs the same command on many servers at once. It is packaged for Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9 (On AlmaLinux/Rocky, enable EPEL first: dnf install epel-release.).

Install

apt install pssh                                 # commands: parallel-ssh, parallel-scp ...
dnf install epel-release && dnf install pssh   # commands: pssh, pscp.pssh ...

Create a host list

One server per line, optionally with user and port, in ~/hosts.txt:

root@192.0.2.10
root@192.0.2.11:2222
admin@server3.example.com

Run commands

parallel-ssh -h ~/hosts.txt -i "uptime"                  # -i shows each server's output
parallel-ssh -h ~/hosts.txt -t 60 -i "dnf -y upgrade"     # -t: timeout in seconds
parallel-scp -h ~/hosts.txt ./config.conf /etc/myapp/     # copy a file to all servers

Use SSH keys: pssh cannot type a password for each server (-A asks once and uses it everywhere).

Tip: For regular management of many servers, Ansible does the same and more (ansible all -i hosts.txt -m ping), and keeps your setup in files you can repeat.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket