How to scp with a second remote host
I wonder if there is a way for me to SCP the file from remote2 host directly from my local machine by going through a remote1 host. The networks only allow connections to remote2 host from remote1 host. Also, neither remote1 host nor remote2 host can scp to my local machine. Is there something like: scp user1@remote1:user2@remote2:file . First window: ssh remote1 , then scp remot2:file . . Second shell: scp remote1:file . First window: rm file; logout I could write a script to do all these steps, but if there is a direct way, I would rather use it. Thanks. EDIT: I am thinking something like