Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

tar through ssh

When you want to copy a whole directory, without having to actually make a huge tarball, copy it over, and extract it, here is a way to do it. You will want to ensure you have passwordless auth enabled, either with ssh keys or kerberos auth or something else.

tar -zcf - dirname | ssh bgstack15@destinationserver "tar -zxf -"

References

Weblinks

  1. How To Use tar Command Through Network Over SSH Session

Comments