Skip to content

Instantly share code, notes, and snippets.

@tjovicic
Created April 6, 2020 16:56
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 tjovicic/7e2700e47e061e4d052d64444213d66b to your computer and use it in GitHub Desktop.
Save tjovicic/7e2700e47e061e4d052d64444213d66b to your computer and use it in GitHub Desktop.
AWS EC2 - RDS port forwarding
1. Set "AllowTcpForwarding yes" in /etc/ssh/sshd_config on EC2 instance
2. sudo ssh -i "bastion.pem" -N -L 3307:mydatabase.abc123.eu-central-1.rds.amazonaws.com:3306 ec2-user@ec2-abc-123.eu-central-1.compute.amazonaws.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment