Connecting to my MongoDB database from Mongodb Compass Community app
Does anyone know what ssh settings I need to flip (or un-flip) in my sshd_config file to get the Compass app to be able to create an SSH tunnel? Right now I get a timeout, which is a lot better than the flat out rejection I was getting…
A lot of times a connection timeout while trying to use SSH is related to a couple of different things, which I recommend checking.
- The SSH port (generally port 22) is blocked by a firewall. We have an additional post that discusses opening ports through your firewall:
- SSH is not set up to listen on the port you're trying to connect with.
Not being an expert on Compass, I did some research online and it looks like you'll just need to have the ports configured properly in order for that connection to succeed.
Here is MongoDB's initial set-up instructions for an SSH tunnel:
I also found a troubleshooting guide that goes over some potential solutions you can try if you've gone through the set-up guide and configured everything as it instructed:
The above link will give you a bunch of different scenarios you can look into to see what could be causing the connection issue.