Bind a remote server's port to a local port

If you have a remote server (say in Amazon EC2) you might want to access a particular port of that server. But there can be situations where it is not that port is not globally open. If you do not want to bother making it globally open you can use it by binding it to a local port of your workstation via ssh. Following command will bind port 9000 of remote machine to your local port 8000.  As an example if it is web server you can easily access it by typing localhost:8000 in your web browser.

ssh -L 8000:localhost:9000 username@host

Comments

Popular posts from this blog

Create new Java Class files at runtime

Using iReport plugin for Jasper Reports in Netbeans

Android: Using Google maps app to show places in your application