parallel-scp(1)

πŸ’– parallel-scp β€” the glow-up guide πŸ’–

okay bestie, welcome to parallel-scp(1) from the General Commands Manual section. sit down, grab a boba, we're about to copy files to like a million hosts at once and it's gonna be ✨iconic✨.


✨ NAME ✨

parallel-scp β€” parallel file upload program πŸ¦‹

no fr that's the whole thing, it's a program that uploads files in parallel. slay.


🌸 SYNOPSIS 🌸

parallel-scp [-vAr] [-h hosts_file] [-H [user@]host[:port]] [-l user]
[-p par] [-o outdir] [-e errdir] [-t timeout] [-O options] [-x args] [-X
arg] local remote

πŸŽ€ DESCRIPTION πŸŽ€

so parallel-scp is literally a program for copying files in parallel to a whole bunch of hosts, and it does it by using the scp program. it's giving main character energy for your file distribution era.

it also has some extra little features that are lowkey essential: passing a password to scp, saving output to files, and timing out. iykyk πŸ’…


πŸ’… OPTIONS πŸ’…

  • -h host_file, --hosts host_file β€” read hosts from the given host_file. the lines in the host file look like [user@]host[:port], and yes you can include blank lines and comments (comments are lines that start with "#"). if you pass multiple host files (aka you use -h more than once), parallel-scp acts like all those files got concatenated together. and if a host shows up multiple times? then parallel-scp will connect that many times. no cap. πŸ”₯
  • -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 give this option multiple times, and you can absolutely use it alongside the -h option. they're besties, not rivals 🫢
  • -l user, --user user β€” use the given username as the default for any host entries that don't specifically specify a user. the backup username, the understudy, the girl who steps in when nobody else is named πŸ’–
  • -p parallelism, --par parallelism β€” use the given number as the maximum number of concurrent connections. that's your "how many friends can come to the party at once" number.
  • -t timeout, --timeout timeout β€” make connections time out after the given number of seconds. and if you set the value to 0, parallel-scp will not timeout any connections at all. zero means the vibes are eternal, no deadlines, no pressure ✨
  • -o outdir, --outdir outdir β€” save standard output to files in the given directory. filenames are of the form [user@]host[:port][.num], and the user and port only show up for hosts that explicitly specify them. the num is a counter that gets incremented each time for hosts that are specified more than once.
  • -e errdir, --errdir errdir β€” save standard error to files in the given directory. filenames are the same form as with the -o option. same energy, different stream πŸ’€
  • -x args, --extra-args args β€” passes extra SSH command-line arguments (peep the ssh(1) man page for more info about SSH arguments). you can specify this option multiple times. the arguments get processed to split on whitespace, protect text within quotes, and escape with backslashes. if you wanna pass arguments without that processing, use the -X option instead.
  • -X arg, --extra-arg arg β€” passes a single SSH command-line argument (again, ssh(1) man page for more about SSH arguments). unlike the -x option, no processing happens on the argument, word splitting included. to pass multiple command-line arguments, use the option once for each argument. one arg, one use, periodt.
  • -O options, --options options β€” SSH options in the format used in the SSH configuration file (see the ssh_config(5) man page for more info). this option may be specified multiple times. obsessed with the flexibility ngl.
  • -A, --askpass β€” prompt for a password and pass it to ssh. the password may be used either to unlock a key or for password authentication. the password is transferred in a fairly secure manner (like, it won't show up in argument lists, okay?). however β€” be aware that a root user on your system could potentially intercept the password. 😭 so like, stay aware bestie.
  • -v, --verbose β€” include error messages from ssh with the -i and -e options. she's loud and she's proud.
  • -r, --recursive β€” recursively copy directories. go down the whole tree, no skipping levels, we do not gatekeep 🧚

🌈 TIPS 🌈

the ssh_config file can include an arbitrary number of Host sections. each host entry specifies ssh options which apply only to that given host. and here's the wild part β€” Host definitions can even behave like aliases if the HostName option is included. this ssh feature, combined with parallel-ssh host files, provides a tremendous amount of flexibility. genuinely a power combo, i'm obsessed ⭐


πŸ‘‘ EXIT STATUS πŸ‘‘

the exit status codes from parallel-scp are as follows, bestie, memorize these:

  • 0 β€” Success ✨
  • 1 β€” Miscellaneous error
  • 2 β€” Syntax or usage error
  • 3 β€” At least one process was killed by a signal or timed out.
  • 4 β€” All processes completed, but at least one scp process reported an error (exit status other than 0).

πŸ’œ AUTHORS πŸ’œ

written by Brent N. Chun <bnc@theether.org> and Andrew McNabb <amcnabb@mcnabbs.org>. absolute legends, we thank them for their service 🫑

https://github.com/lilydjwg/parallel-ssh


πŸ¦‹ SEE ALSO πŸ¦‹

ssh(1), ssh_config(5), parallel-ssh(1), parallel-rsync(1), parallel-slurp(1), parallel-nuke(1),


and that's the whole page, bestie!! πŸŽ€ this one's from the General Commands Manual, dated January 24, 2012, and it's parallel-scp(1) β€” go forth and copy in parallel, you've got this πŸ’–πŸŒΈβœ¨

πŸ“¦ where this page comes from