I have a kubuntu 17.10 (host) and a VM guest Ubuntu Server 16.04 with mongoDB.

I installed mongoDB Compass CE on my host so I can handle my DB remotely.

I got stuck with the connection screen.

I read the documentation but I get errors.

My values are:

Hostname: Local IP of guest machine ( which I connect normally via ssh from command line port 22

Port: 27017 (check on my guest with cat /etc/mongod.conf | grep port)

Authentication: None ( I do not use any when on my guest type mongo)

Read Preference: Primary (I do not know it but my db is default, I have insert only a collection)

SSL: None

SSH Tunnel: Use Password

SSH Hostname: See bottom

SSH Tunnel Port: 22

SSH Username: guest username

SSH Password: guest username's password

For SSH Hostname: When: I get the error

Error creating SSH Tunnel: (SSH) Channel open failure: Connection refused

When: ubuntu1604 (this is my bastion on guest) I get the error Error creating SSH Tunnel: Timed out while waiting for handshake

I do not know if it is necessary but I have open the port 27017 also. Mongo runs as a service (service mongod start) Am I doing something wrong?

  • I added also the iptable rules on the server using this And tried this tutorial without the authantication – trelozakinthinos Feb 3 '18 at 23:10

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.