We are using postgres db hosted two servers away, (pardon my jargon) we usually connect through terminal like:
local =>(using google auth) ssh server 1 =>(using google auth) ssh server 2 => psql -h Hostname -U Uname -d DBName
But, this is a hectic process and I'd like to connect to the DB through Dbeaver.
I browsed online and I figured it could be done with SSH tunneling but I could only hop through one server and it does not connect to the other.
Appreciate your help, thanks in advance!
My trials:
ssh -A -t host1.host.server1.com \ -L 5432:localhost:5432 \ ssh -A -t queries.host.server2.com \ -L 5432:localhost:5432
and I couldn't successfully connect. Even if I did connect, T'd only be connected to the machine but to access the DB I'll have to run the psql command. I'm totally lost after this point.