pnuke(1)
π pnuke β the parallel process kill program π
okay bestie, listen up, because pnuke from the General Commands Manual (section 1, obvs) is about to become your new fave. it's giving "i have thirty servers and zero patience" and honestly? iconic.
β¨ SYNOPSIS β¨
pnuke [-vA] [-h hosts_file] [-H [user@]host[:port]] [-l user] [-p par]
[-o outdir] [-e errdir] [-t timeout] [-O options] [-x args] [-X arg]
pattern
πΈ DESCRIPTION πΈ
so pnuke is literally a program for killing processes in parallel across a whole bunch of hosts at once. no cap. instead of ssh-ing into each machine like some kind of Victorian orphan, you just point pnuke at your host list and it goes feral (respectfully).
it also comes with the little luxuries you deserve: passing a password to ssh, saving output to files, and timing out. main character energy fr. π
π OPTIONS π
-hhost_file,--hostshost_file β read hosts from the given host_file. lines in the host file look like[user@]host[:port]and you're allowed blank lines and comments (lines starting with#). if you give multiple host files (so, using-hmore than once),pnukeacts like it just smooshed them all into one big file. and if a host shows up multiple times?pnukewill connect that many times. it said "i'll do it again, and i'll do it better". π¦-H[user@]host[:port],--host[user@]host[:port],-H"[user@]host[:port] [ [user@]host[:port ] ... ]",--host"[user@]host[:port] [ [user@]host[:port ] ... ]"β add the given host strings to the list of hosts. you can drop this option multiple times, and it plays nice with-htoo. friendship bracelet behavior. π«Ά-luser,--useruser β use user as the default username for any host entries that don't already specify their own. so the ones who didn't pick a name get adopted. π₯Ί-pparallelism,--parparallelism β use this number as the max number of concurrent connections. it's the bouncer at the club door, and the club is your network. π-ttimeout,--timeouttimeout β connections time out after this many seconds. with a value of0,pnukewill not timeout any connections β it'll wait forever, like a girl who's still texting back. π-ooutdir,--outdiroutdir β save standard output to files in outdir. filenames are of the form[user@]host[:port][.num], where the user and port are only included for hosts that explicitly specify them. thenumis a counter that gets incremented each time for hosts specified more than once. very organized, very demure.-eerrdir,--errdirerrdir β save standard error to files in errdir. filenames work exactly like they do with-o. twins. π―-xargs,--extra-argsargs β passes extra SSH command-line arguments (peep thessh(1)man page if you wanna know more about SSH arguments). you can specify this multiple times. the arguments get processed so they split on whitespace, text within quotes is protected, and backslashes escape. if you want to pass arguments without all that processing, use-Xinstead. lowkey a whole personality trait.-Xarg,--extra-argarg β passes a single SSH command-line argument (again,ssh(1)has the lore). unlike-x, no processing is performed on the argument, word splitting included. to pass multiple command-line arguments, use this option once for each argument. one arg, one option, one vibe. β¨-Ooptions,--optionsoptions β SSH options in the format used in the SSH configuration file (seessh_config(5)for the details). may be specified multiple times. slay.-A,--askpassβ prompt for a password and pass it tossh. the password may be used to unlock a key or for password authentication. it's transferred in a fairly secure manner (like, it won't show up in argument lists, thank god). but β and this is important β a root user on your system could potentially intercept the password. so, yk, trust your sysadmin. or don't. π-v,--verboseβ include error messages fromsshwith the-iand-eoptions. it's the "say more, bestie" flag.
π§ TIPS π§
the ssh_config file can include an arbitrary number of Host sections. each host entry specifies ssh options that apply only to that given host. host definitions can even behave like aliases if the HostName option is included. this ssh feature, combined with pssh host files, provides a tremendous amount of flexibility. the power that that has. π₯
internally it uses the pkill command and sends signal 9 (the unblockable KILL signal). that's not a warning, that's a flex. πβ¨
π EXIT STATUS π
the exit status codes from pnuke are as follows:
0β Success π1β Miscellaneous error2β Syntax or usage error3β At least one process was killed by a signal or timed out.4β All processes completed, but at least one ssh process reported an error (exit status255).5β There were no ssh errors, but at least one remote command had a non-zero exit status.
π AUTHORS π
written by Brent N. Chun <bnc@theether.org> and Andrew McNabb <amcnabb@mcnabbs.org>. absolute legends, we stan. π
https://github.com/lilydjwg/pssh
π SEE ALSO π
ssh(1), ssh_config(5), pssh(1), pscp(1), prsync(1), pslurp(1),
and that's the whole page, bestie!! this little beauty came out of the General Commands Manual, section 1, dated January 24, 2012 β an absolute vintage. go forth and kill some processes in parallel. periodt. π π¦π
π¦ where this page comes from
- epel 10: pssh 2.3.5-8.el10_0 Β· LicenseRef-Callaway-BSD
- epel 9: pssh 2.3.4-1.el9 Β· BSD
- fedora 43: pssh 2.3.5-13.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: pssh 2.3.6-1.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: pssh 2.3.6-2.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms