I have a huge directory I want to copy to another machine as a .tar.gz file. I don't have a lot of space on either machine, so I'd like to copy the file through a pipe, like this:
tar -czf - mydirectory | ssh other.machine.science "cat > file/location/myfile.tar.gz"
The computer I'm logging in to has my shell set to
nologin, though, as I am only allowed to copy files on and off of it with scp.
How can I copy a file from a pipe to a system where I don't have shell access?