Ever needed to copy a file from one host to another, but being forced to go over an intermediate host because you don’t have the rights to access the machine with the file directly?
Let me put an end to your dispair then! Here’s a small script called scp-via that can do this for you! Just run
scp-via $VIA_HOST $FROM_TARGET $TO_TARGET
– with the same syntax for FROM_TARGET and TO_TARGET as you use for regular scp.
Basically it performs a little scp, netcat, ssh magic under the hood, but hopefully you need not worry about that.
I believe I need not say that scp-via comes with absolutely no warranty or guarantees about not desctroying your hard drives. Run it at your own risk.