By docstrange
I am trying to connect remotely to a PostgreSQL DB using PGAdmin III
FYI I am using SSH Keys to connect to my instance, no passwords.
I have setup the SSH tunnel like so:
ssh -L 3333:remote.server.com:5432 myuser@remote.server.com
Then in the postgresql.conf I have modified the listening addresses to: listen_addresses='*'
Just in case, I also added to pg_hba.conf the line :
host all all 0.0.0.0/0 md5 however I still get the same error so I believe this is useless.
Finally in PGAdmin, I create new connection using host: localhost port: 3333 (as per local tunnel option above) username: myuser Then on SSH tunnel tab, I have a checkmark on use SSH tunneling tunnel host: remote.server.com tunnel post: 5432 username: myuser identity_file: I point to my local id_rsa.pub file and I enter my passphrase.
I get the following error: SSH error: Error when starting up SSH session with error code -13
I added the -v option to the SSH tunnel creation line and I see “authentication successful” as well as “local forwarding listening on 127.0.0.1 port 3333”
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.