Thursday, 29 March 2012

Access a remote service localy via ssh

This will be just a short reminder for myself not to forget how to forward a remote service's port to a local one through ssh. Here is the schema:
ssh -i .ssh/ssh_keys/root -L 55432:localhost:5432
With -i we use a private key to the remote host's user named root at the end. Next we say we want to access a local port -55432- and send the data through that one to the remote port -5432-. We want to use our localhost to address the service which is hosted on the machine.

This wraps it up. ^_^

No comments:

Post a Comment