Skip to content

Instantly share code, notes, and snippets.

@GregoryWiltshire
Last active February 16, 2023 01:36
Show Gist options
  • Save GregoryWiltshire/2b2f3b460c2b7fffe864bc43fc1138c6 to your computer and use it in GitHub Desktop.
Save GregoryWiltshire/2b2f3b460c2b7fffe864bc43fc1138c6 to your computer and use it in GitHub Desktop.

This is a guide for how to get dbeaver connected to your rds cluster.

Dependencies:

brew tap AdoptOpenJDK/openjdk
brew cask install adoptopenjdk11
brew cask install dbeaver-community
  1. create bastion host to sit inside your vpc, and add ssh keys for your user

  2. Open dbeaver and create a new connection to postgres and install drivers for postgres-jdbc

  3. Use the configuration:

Main

Host = localhost
Database = database-name
Username = your-database-username
Password = database-password

SSH
check 'use ssh'

Host/IP = host/public ip of your bastion server
Port = 22
Authentication Method = Public Key
User Name = your-bastion-user  
Private Key = /Users/you/.ssh/your-private-key.pem
Remote host = your-database.cluster-xxxxxxxxxxxx.region-xx-1.rds.amazonaws.com
Passphrase = yoursshpassphrase
Local port = 5432
Remote port 5432 

If necessary you can convert existing openssh private keys to RSA key:
dbeaver/dbeaver#5845
ssh-keygen -p -m PEM -f ~/.ssh/youropensshprivatekey

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