How to connect to databases using SSH tunneling
server.acme.com
. And the server can connect to the managed database using the private DNS database.acme.com
.ssh
: Is the command to initiate SSH-L 5432:database.acme.com:5432
: Sets up the port forwarding. It forwards your local port 5432 to port 5432 on the RDS instance. Replace database.acme.com
with the actual endpoint of your RDS database.{SERVER_USERNAME}@server.acme.com
: Replace server.acme.com
with the public IP address or DNS of your server. Replace {SERVER_USERNAME}
with the username you use to connect to the server. This command assumes password-based authentication and will prompt you to enter the password for the username. Refer to ssh’s documentation if you need to use a different authentication method.localhost:5432
. For example, when configuring your Latitude source file, you would use the following settings: