Skip to content

Instantly share code, notes, and snippets.

@aonurdemir
Last active February 4, 2024 05:17
Show Gist options
  • Save aonurdemir/abf73895b73dd4938a4d75fa7936efb2 to your computer and use it in GitHub Desktop.
Save aonurdemir/abf73895b73dd4938a4d75fa7936efb2 to your computer and use it in GitHub Desktop.
Tunnel
ssh -L 3308:<DB_MACHINE_HOST_ADDRESS>:3306 -f <USER>@<SSH_MACHINE_HOST_ADDRESS> -p <SSH_PORT> -NnT
DB request to localhost:3308 ->(goes to) <SSH_MACHINE_HOST_ADDRESS>:<SSH_PORT> -> <DB_MACHINE_HOST_ADDRESS>:3306
-L local port forwarding
-f run in background
-T disable psuedo terminal allocation
-Nn disable stdin and execution of commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment