Can't connect ssh mongodb

If you’re accessing to a cloud service, where a mongod instance is running, and if you can connect locally but not remotely, it could be a firewall rule.

To find out whether the remote server or your local network is the problem, you can ping some server running on port 27017. Try this address on a browser: https://portquiz.net:27017 (given by mongodb instructors, M121).

If you can, then open the port on the server, if you can’t, inspect your local network/PC.