SSH Tunnel - Connect to Sensitive Linux Server Applications

SSH Tunnel - Connect to Sensitive Linux Server Applications

Demonstrates how to connect to phpmyadmin and phppgadmin via a SSH tunnel. Doing so enables you to block the port via a firewall or the URL via apache from the outside world. See Email Discussion. To perform the same from a Mac or Linux box, here are some good examples. The below example assumes that you want to connect to an ssh server at $IP_SOMEIP and a webserver on that same machine (localhost) on port 3000. You can use http://localhost:30000 from your local machine to access the remote web server at port 3000 after the below statement is executed.
ssh $PEM_SOMEPEM -f ubuntu@$IP_SOMEIP -L 30000:localhost:3000 -N
The iDempiere server monitor (server management) page (port 8443) is also protected by jetty by only allowing local connections. You can use the above method to connect, or you can configure Jetty to allow connections from everyone. Here is a link with the instructions. Here is an example of how to close the tunnel:
#get pid and kill it
ps aux | grep 30000:localhost
kill -9 <process id>