I can see that similar questions to this have been asked before, but I've not been able to quite grok what's going on in the answers to those questions and whether they apply to my situation.
So, firstly, I'm running DataGrip (trial) on Windows 10 Pro with OpenSSH and my .ssh/config file contains some ProxyCommand stuff that deals with multi-hop/jump host logins. Here's the config (with server names redacted/changed of course):
ProxyCommand ssh -p 22101 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null bastion.example.com -W %h:%p
So, what I'm trying to do with DataGrip is connect to a MySQL 5 server that is only accessible from a server that matches the server-amz-* Host, in this example, server-amz-www1
The SSH tunnel I need is as follows:
Local machine > bastion.example.com > server-amz-www1
I then need DataGrip to connect to server-mysql-1 *from* server-amz-www1
bastion.example.com and server-amz-www1 use public key authentication.
I've tried various configurations in the SSH tunnel, but nothing appears to work - does DataGrip actually create the SSH tunnel(s) on demand, or do I need to create those first outside of DataGrip for it to use?
Creating the SSH tunnel manually with this command lets me connect to the database using HeidiSQL (by connecting to localhost:3308), but DataGrip doesn't like it.
ssh -L 3308:server-mysql-1:3306 server-amz-www1
Thanks in advance.