Posts tagged 'ssh'

SCP remote files back home using reverse SSH (in 1 command)

My recent work has involved copying files from a remote host, only accessible via a hop, back to my local computer. This has been simple in the past as the remote host has been able to connect to the local computer and SCP files directly, on account of the firewall allowing this. Recently, the firewall against the local computer has been reconfigured for security and direct connection is no longer possible. I could pass my files through a 3rd-party that both the remote and local machines can get to, but let’s say I don’t have one.

What you …

Unix: SSH Port Forwarding

So it’s not that special and I bet 1000 people have already posted the same details. Still, it’s cool and I need a place to record my thoughts about this:

ssh host.name -L YYYY:other.host:ZZZZ

Essentially, this means logging into the first machine and creating port YYYY on the local machine as the port ZZZZ from other.host

Works well.