Skip to content

Instantly share code, notes, and snippets.

@harshalbhakta
Created June 23, 2014 06:29
Show Gist options
  • Select an option

  • Save harshalbhakta/919385ccfde84aa3f41a to your computer and use it in GitHub Desktop.

Select an option

Save harshalbhakta/919385ccfde84aa3f41a to your computer and use it in GitHub Desktop.
Connect to remote Postgresql db from PgAdmin
# Postgresql database is running on server 192.168.0.1:5432 for user deployer
#
# Crearte SSH tunnel for pgadmin to connect to remote server.
# localhost@5555 => 192.168.0.1@5432
# Connect using localhost & 5555 in PgAdmin
$ ssh -fNg -L 5555:localhost:5432 deployer@192.168.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment