Connecting to mongodb via ssh tunnel in Node.js

I’m trying to connect to my mongodb instance through a ssh tunnel. I’m able to connect when using the mongo cli with the following command

mongo “mongodb://:@”

But when i use npm library mongodb and calling

      ssl: false,
      sslValidate: false,
      useNewUrlParser: true,
      useUnifiedTopology: true,

I get a connection timeout.
Can anyone help me out on this one?

Just for fun, have you tried making it localhost instead of