Skip to content

Instantly share code, notes, and snippets.

@amura2406
Last active August 15, 2017 06:13
Show Gist options
  • Save amura2406/5134f33a20feea0488f2ec132b12e372 to your computer and use it in GitHub Desktop.
Save amura2406/5134f33a20feea0488f2ec132b12e372 to your computer and use it in GitHub Desktop.
Some Useful SSH Command

SSH Tunnel

ssh -A -t userone@hostone ssh -A -t -p<port2> usertwo@hosttwo

Local Port Forwarding to 2 servers

ssh userone@hostone -L <localport>:hosttwo:<port2> -f -N

SCP to server behind another server

scp -P<localport> <filetoupload> usertwo@localhost:.

More on SSH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment