Connect MongoDB Compass to VPS

I have installed mongodb-org-4.4/7 in a VPS (CentOS Linux 7 Core ) and everything works fine so far.
I am trying to connect to Mongodb in VPS with Compass via SSH .
I have already whitelist my IP in VPS firewall by running csf -a MY_IP_ADDRESS .
Although, I am not sure what settings I have to fill in Compass .
I am using

Hostname : localhost
Port : 27017
SRV Record : Off
Authentication : None

Read Preference : Primary
SSL : None
SSH Tunnel : Use Password
SSH Hostname : // I am not sure if it needs server’s IP (
SSH Tunnel Port : 16969 // My VPS doesn’t use 22 as default
SSH Username : root
SSH Password : my_ssh_password

With the above setting I get the following errors at attached images .

Thank you in advance .

Many ssh setups disallow login by root expecting users with sudo authorization to log in under their own userid and go sudo. Maybe you are in such a situation.

1 Like