Many users have their MongoDB instance running on a remove server (say in AWS or some other cloud) and for security reasons all/most of the ports on this server are purposely blocked including port number 27017 (which is the default one for MongoDB).
Now MongoVUE doesn’t natively support SSH protocol. So you cannot directly connect to these servers over SSH. Also, there are no SSH options in MongoVUE connections dialog!
But there is some good news too. It is fairly easy to setup an SSH tunnel between your PC (client) and your server, and MongoVUE can use this tunnel to connect to your remotely running MongoDB instance.
Let us do this stepwise.
Download and install PuTTY. This software will be used to setup SSH tunnel.
Launch PuTTY, and navigate to the “Connection > SSH > Tunnels” screen
For “Source port”, enter the port number you want to utilize on your client PC. We’ll use “5151”.
For “Destination”, enter the IP and port on the remove server to which you wan to connect to. Here we’ll use “127.0.0.1:27017”.
Select the “IPv4” radio button
Click the “Add” button
Now click the “Session” category on the left, and enter IP of your remote server under “Host Name”.
Click the “Open” button. You will be asked to enter your user and password info on the shell. Once you login, your SSH tunnel is setup!
We are almost done. Lets fire up MongoVUE and open a new connection windows. On this windows, the server and port number we enter are for PC client end of SSH tunnel. Now if our MongoDB needs some authentication, we can enter that in Username and Password fields.
Hit the “Save” button and then open the connection!