How to scp with a second remote host

I don’t know of any way to copy the file directly in one single command, but if you can concede to running an SSH instance in the background to just keep a port forwarding tunnel open, then you could copy the file in one command. Like this: # First, open the tunnel ssh -L 1234:remote2:22 … Read more