Tried taking dump from a remote node and got the following error:
Failed: can't create session: could not connect to server: connection(): auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-256": (AuthenticationFailed) Authentication failed.
Tried two methods to take dump from the remote node. But got the same error in both the methods.
# Method 1
mongodump -h remoteip@port -u xxx -p xxx --db xxx --authenticationDatabase admin
# Method 2
mongodump --uri "mongodb://username:password@remoteip:port/db?authSource=admin"
How to resolve this?