I'm having trouble connecting to a remote database server.
I'm on a Windows 10 client and can successfully connect to my Ubuntu 16 server with putty over SSH, including with a keypair.
Now I have a MongoDB server running on the server which I want to connect to from my client but I don't want the server exposed more than necessary (it's not meant for public use anyway) to the internet so I want to use my SSH tunnel and forward the correct port trough it. I have no problem using the database server locally from within the server.
When trying to connect to the database from the client however I get connection refused.
On the server, in
/var/log/auth.log I get when trying to connect:
sshd: error: connect_to < public-ip-redacted> port 27017: failed.
The sshd_config on the server has
On the server with tcptrack I can see some connections popping up but resetting on the loopback interface when trying to connect from the client and they disappear after 1-2 seconds.
What am I missing?