Sign in with Mongo shell without having password shown?
If you add a flag -p
but you don't specify a password, MongoDB shell will prompt you for a password.
mongo -u user -p --authenticationDatabase admin
The password will be hidden as you type and will not be recorded in the shell history.