Skip to content

Instantly share code, notes, and snippets.

@jazzytomato
Created March 15, 2018 15:03
Show Gist options
  • Save jazzytomato/a0b14b6961551a8fb1635314451398a7 to your computer and use it in GitHub Desktop.
Save jazzytomato/a0b14b6961551a8fb1635314451398a7 to your computer and use it in GitHub Desktop.
SSH Local tunneling
# Local tunnel to connect to remote DB via bastion ec2 instance
ssh -N -L 5433:DBHOSTNAME.eu-west-1.rds.amazonaws.com:5432 tom@ecX-XX-XXX-XXX-XXX.eu-west-1.compute.amazonaws.com
# then connects to db locally with localhost:5433
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment