SSH Tunnel works, but connection to mongodb not

Samuel Suther shared this idea 2 years ago

noSQLBooster 6.2


I've seen some other posts here in the forum, but couldn't find a solution after trying for hours now.

Here is the issue:

I've created a ssh-login for user `deploy`.

I can login via ssh with this user, and I can access mongo with this user via ssh-cli

The mongo.conf has this:

# network interfaces
  port: 27017
Server is up and running.

Next I've tried to connect via SSH-Tunnel to this server. SSH-Connection is established, but the connection to the mongo db not:


Why does "Connect to localhost" is the first failure. Might it be, that the noSQLBooster try to connect to via the mapped tunnel-ip on localhost, BEFORE the tunnel is established?

BTW: If I change bindIP to the official Server-IP-Address, and login without ssh-tunnel connection it work like expected. But I need to access mongo via SSH-Tunnel for security purposes.

Replies (1)


I've fixed it.

The issue was, that I need to set "AllowTcpForwarding yes` in `/etc/ssh/sshd_conf` at the server.

Then it works like expected.

Leave a Comment
Attach a file