From 702be10567a2d92a12bc9d28ec5bf9626471422a Mon Sep 17 00:00:00 2001 From: Dan Sosedoff Date: Thu, 4 Dec 2014 23:35:25 -0600 Subject: [PATCH] Add ssh gateway usage to readme --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index a025a6c..20f14f3 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,21 @@ pgweb --url postgres://user:password@host:port/database?sslmode=[mode] It works great with [Heroku Postgres](https://postgres.heroku.com) if you need to troubleshoot production database or simply run a few queries. +### SSH Gateway + +If your postgres server is running behind firewall, you can connect to it using +ssh gateways. First, you'll need to run a ssh command: + +``` +ssh -Ng -L 5433:localhost:5432 user@remotehost.com +``` + +Then you can start pgweb with the following command: + +``` +pgweb --url postgres://user:password@localhost:5433/database +``` + ### CLI options ```