Skip to content

Instantly share code, notes, and snippets.

@decuser
Created September 29, 2017 01:13
Show Gist options
  • Save decuser/7d622b1a7269b14c9cef8d7d975c8684 to your computer and use it in GitHub Desktop.
Save decuser/7d622b1a7269b14c9cef8d7d975c8684 to your computer and use it in GitHub Desktop.
simple tunnel
set up a tunnel that will exist on the remote machine back to the local machine
ssh -R 2222:localhost:22 remote
on the remote, port 2222 will refer to the local machine's port 22
so to copy a file back from the remote to the local using scp
scp -P2222 myfile user@localhost:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment