I am not able to connect to MongoDB using below command-
mongo --host 192.168.42.100
vagrant ssh mongo
Many reasons might prevent you to be able to do it the way you try to do it. The ssh way is the recommended way.
Earlier, I was able to connect mongoDB in the guest machine.
Now I am able to connect from host machine using below command.
mongo --host localhost:27017