I must be doing something wrong, as I don't use LocalForward from the ssh config above, where does this go? putting it in Tunnel host does not work. I don't understand where everything goes in pgAdmin. Tunnel from localhost to host1 and from host1 to host2: ssh -L 9999:localhost:9999 host1 ssh -L 9999:localhost:1234 -N host2. As noted above, the connection from host1 to host2 will not be secured. I am also given the dproduction database password for the database I am trying to connect to: dproduction_pwd You basically have three possibilities: Tunnel from localhost to host1: ssh -L 9999:host2:1234 -N host1. Now you can tunnel your way through to PostgreSQL: ssh -N prodĪnd now psql et al can connect (You must open a new Terminal window while the SSH tunnel is running): psql -h localhost -p 9999 -U connectionusername -d dproduction If you do not have PuTTY installed you can download it from our. I am given the following instructions (I changed all the names and ports in the below)Īdd the following to your SSH config (~/.ssh/config): Host prod This an alternative to using the VPN for remotely accessing your work computer. On the remote end the tunnel will funnel traffic to the remote ends port 40001. Port 50000 will be used for uniqueness and clarity of example. I am trying to establish a connection to a postgres DB with SSH tunnel. On the client side: Since traffic to the localhost does not pass through the unsecured network ssh is used to connect to the remote/server host via port 22 and a tunnel is setup bound to a local port.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |