Cannot use SSH tunnel to connect to AWS RDS

Completed

I want to connect to a RDS MariaDB using a SSH tunnel through a bastion host.

 

Establishing a tunnel using 

ssh user@bastionhost -L 3306:aws-rds-url:3306

in the background and connection parameters "localhost:3306" works.

 

I try to establish the SSH tunnel using DataGrip the following way:

Host: aws-rds-url 

Port: 3306

Use SSH tunnel: yes

Proxy host: <bastionhost>

Proxy port: 3306

Proxy user: <user>

Local port: 3306

Auth type: OpenSSH config and authentication agent (or "Key pair" and key file / passphrase)

 

This doesn't work, I'm getting "SSH tunnel creation failed: com.intellij.execution.ExecutionException: SSH: Operation timed out (Connection timed out)"

1
2 comments

@ Michael Johann,

Could you email vasily.chernov@jetbrains.com IDE logs to me?

0

I found the simple solution: Proxy Port has to be the SSH Port 22.

I mirrored the CLI parameters instead and the example in the documentation tricked me, becaused they used some random port 7000 instead of the common SSH port. 

1

Please sign in to leave a comment.