No it is not. It is something about the command you run. Your machine is
and mongosh fails with
You are trying to connect to the wrong IP.
And it works when you ssh because you ssh to the appropriate machine