0

We have server at the office that I can access it only from the local wifi just by ssh into it: ssh@192.168.111.111 . Also if I type 192.168.111.111 in the browser, it will show me the phpmyadmin interface which is apparently set on port 80.

I often need to work from home including some simple server side work (I'm not proficient with linux, but I can do simple stuff). So I need to open ssh tunnel to my home machine (or from my home machine... not sure).

My work ip is 201.222.222.222 and my home ip is 230.333.333.333.

My guess is that to achieve what I want, I need to run this command on the server. ssh -R remote_port:local_address:local_port username@server.com

ssh -R 8080:192.168.111.111:80 root@230.333.333.333 - would this command typed on the server at my work do the trick and allow me to ssh into it using port 8080 or do I completely miss the logic? (if yes, could you suggest the right workflow)

0

Assuming that your SSH server has access to 192.168.111.111 try this:

ssh -L 8080:192.168.111.111:80 user@201.222.222.222

then you can open http://127.0.0.1:8080 in your browser. You should see phpmyadmin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.