Can't connect ssh mongodb

can’t connect ssh mongodb https://streamable.com/ltogd4

Can’t help without more details.

i installed mongodb for ubuntu, but i cant connect shh with mongodb compass windown

What did you try?

Where does it fails?

What error messages are you getting?


I have allowed self access to multiple ip addresses


and i login with mongo compass on win 10 but no success

I am not Windows capable. What you are showing does not ring a bell. You are showing a configuration for mongod, but where does it reside? If it is the same as your workstation, why don’t your use localhost to connect? If they are not the same, then a million (actually a few hundred) things can stops you from connecting. Almost none specific to MongoDB.

  1. Is mongod running on the machine where the configuration file you posted is located?
  2. What are the IP address of the machine where mongod is running?
  3. What are the IP address of the machine from which you try to connect?
  4. Can you ping this machine from the machine where you cannot connect with Compass?
  5. Any reason why zikvip is your authentication database rather than admin?
  6. Does your firewall allows you to connect to the server from the client?

If you’re accessing to a cloud service, where a mongod instance is running, and if you can connect locally but not remotely, it could be a firewall rule.

To find out whether the remote server or your local network is the problem, you can ping some server running on port 27017. Try this address on a browser: https://portquiz.net:27017 (given by mongodb instructors, M121).

If you can, then open the port on the server, if you can’t, inspect your local network/PC.

Hi @Ha_Thanh ,

Have you setup your SSH Tunnel options for the Compass connection? Are you using SSH based on Password authentication or using an Identity File?

SSH options are set via the “More Options” tab in the Compass connection dialog.

For example, for password-based SSH connection:

NOTE: if you are connecting via SSH you should not have to open your server up to 0.0.0.0. SSH connections will be tunnelled via localhost so the default configuration for a standalone server (binding to the localhost/loopback network interface) should work fine.

Allowing connections from all networking interface with Authorization: disabled is a serious security risk: any client that is able to connect to your deployment will have full read/write access with this configuration. Please review the MongoDB Security Checklist for available security measures.

Regards,
Stennie

1 Like