I have files in a .zip archive I want to upload to a remote server over ssh. I want to avoid uploading and then unzipping because the remote server has limited space.
I could unzip the archive locally and then upload the unzipped files. That seems wasteful and then I have to do some cleanup.
Ideally, I'd like the files that get unpacked from the archive to get sent directly to the remote server instead of saved to the local host. Is there a way to do this over ssh?
Sending stdin/stdout over ssh is covered elsewhere, but because that is tricky with zip files, here's an alternative with sshfs:
Your mileage may very, because sshfs is has various problems.
If you can change your original files to something like gzip, which is one
gz
file per source file, that can easily be redirected over ssh, including fancy progress viewing withpv
.