...
- Download and install Putty
- Start Putty, go to Connection --> SSH --> Tunnels
Enter a "Source port". This is the port on your local machine that will be forwarded to the remote server with the MongoDB. We use 6666 here.
Enter a "Destination". This is the ip of the interface of the remote server. We assume you bound it to localhost and use the standard MongoDB port, so it is 127.0.0.1:27017 here. Don't forget to select the "IPv4" radio button. (Pic. 1)
Finally klick the "Add" button. (Pic. 2) - Now navigate to "Session" and enter the "Host Name" or IP of the remote Server with the MongoDB. (Pic. 3)
Hit the "Open" button, enter your login information and your SSH-tunnel is ready to go. - Start Mongo Management Studio and hit the blue "Connection" button. In the "Server connection" field we now enter the "local side" of the SSH-tunnel, it is 127.0.0.1:6666 (this is the "Source Port" we chose before) in our case.
Hit "Save and connect" and if all went the way it should, you are now connected to your remote database! (Pic.4)
Linux/ Mac:
- To set up a SSH-tunnel open a terminal and enter
...