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…

1 Reply

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:

How do I Open a Port in my Linode's 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:

How to connect MongoDB Compass via 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:

Compass Connection Errors

The above link will give you a bunch of different scenarios you can look into to see what could be causing the connection issue.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct