Obtaining the RSA key of the MongoDB nodes
Use the following command on the MongoDB hosts to get the SHA256 based RSA of every MongoDB node from the MongoDB cluster:
cat /etc/ssh/ssh_host_rsa_key.pub |awk '{print $2}' |base64 -d |sha256sum |awk '{print $1}' |
The output of the commands is the RSA key.
For example:
cat /etc/ssh/ssh_host_rsa_key.pub |awk '{print $2}' |base64 -d |sha256sum |awk '{print $1}' |
Command output:
b2352722053ac9f40bc1XXXXXXXXXXXXXXXXXXXXXXXXX419fa241ba9431fd6b9
Copy the RSA fingerprint. You need to provide this fingerprint when you add the MongoDB credentials.