Skip to content

Instantly share code, notes, and snippets.

@HaykoKoryun
Created October 5, 2017 07:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HaykoKoryun/480d51bdcf841c02d4ba6eddb99bb7d4 to your computer and use it in GitHub Desktop.
Save HaykoKoryun/480d51bdcf841c02d4ba6eddb99bb7d4 to your computer and use it in GitHub Desktop.
scp through ssh tunnel
connect to server B via A
ssh -L 1234:<address of B known to A>:22 <user at A>@<address of A> cat -
on a separate terminal
scp -P 1234 <user at B>@127.0.0.1:/path/to/source destination
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment