Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Question
In linux, say that you have ssh access to a db server (configured in your ssh config file as: remotedb), how to you setup port forwarding such that you can access the database via following command: psql -h localhost -p 9000 (note here that you are accessing the db via port 9000 on our local machine, and assume port 5432 is being used by db on remotedb)
Answer

ssh -L 9000:localhost:5432 remotedb

^^ -L is for Local port forwarding


Question
In linux, say that you have ssh access to a db server (configured in your ssh config file as: remotedb), how to you setup port forwarding such that you can access the database via following command: psql -h localhost -p 9000 (note here that you are accessing the db via port 9000 on our local machine, and assume port 5432 is being used by db on remotedb)
Answer
?

Question
In linux, say that you have ssh access to a db server (configured in your ssh config file as: remotedb), how to you setup port forwarding such that you can access the database via following command: psql -h localhost -p 9000 (note here that you are accessing the db via port 9000 on our local machine, and assume port 5432 is being used by db on remotedb)
Answer

ssh -L 9000:localhost:5432 remotedb

^^ -L is for Local port forwarding

If you want to change selection, open document below and click on "Move attachment"

SSH Tunnel - Local and Remote Port Forwarding Explained With Examples - Trackets Blog
need to connect to a database console, which only allows local connection for security reasons. Let’s say you’re running PostgreSQL on your server, which by default listens on the port 5432. $ <span>ssh -L 9000:localhost:5432 user@example.com The part that changed here is the localhost:5432, which says to forward connections from your local port 9000 to localhost:5432 on your server. Now we can simply connect to our database

Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.