0

We have two servers, one with internet access (srv1) and one without (srv2). MongoDB is running on the server which has no internet access (srv2). The only way to access srv2 is via SSH to srv1 and then SSH to srv2 with a key (srv2-key). Logging into srv1 also needs a key (srv1-key).

For normal SSH or SCP to both servers, we use a ssh-config file as mentioned below with the help of ProxyJump

Host srv1
     Hostname [srv1-ip]
     User ec2-user
     IdentityFile /location/of/srv1/key.pem

Host srv2
     Hostname [srv2-ip]
     User ec2-user
     ProxyJump srv1                   
     IdentityFile /location/of/srv2/key.pem

Is it possible to use RoboMongo to connect to the MongoDB which is running on the second server (srv2)?

  • 1
    As at Robo3T 1.3, there is no UI config for a jump host so this sounds like a possible feature request for the Robo3T GitHub issue queue. A likely workaround (unless your jump host configuration prohibits this) would be to set up port forwarding using ProxyJump and local port forwarding. For example, adding LocalForward 27017 127.0.0.1:27017 to your srv2 entry. With this approach you'd establish the ssh connection first and then connect Robo3T to the locally exposed port. – Stennie Jul 23 at 5:21
  • Thanks for the reply. If there is no UI isn't there any way through changing the config or so on the robo3T to make this possible, also enabling port forwarding would make no point in having the Mongo DB on the second server as it is kept on the second server for security reasons. And this would pose a security vulnerability – Ismail Iqbal Jul 23 at 7:12
  • If Robo3T doesn't directly support your jump host configuration, it sounds like you need to research alternative tools. Port forwarding doesn't necessarily defeat your security because it is still achieving the same outcome (tunneling through a jump host without directly exposing ports on your destination server). When you set up the port forward you should bind to localhost so external clients cannot connect, and presumably your local machine will also have appropriate firewall and security configuration to meet your access policies. – Stennie Jul 25 at 0:38

Your Answer

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

Browse other questions tagged or ask your own question.