Following instructions outlined in MongoDB SSL encryption and Spring's Driver, I got 2.1.0 and after building it, it says it doesn't recognize sslOnNormalPorts, sslPEMKeyFile or sslPEMKeyPassword.
But I saw a --keyFile, and used it (I had to strip out the leading and trailing -----BEGIN RSA PRIVATE KEY---- and -----END RSA PRIVATE KEY----, and trailing '==' from the Base64 encoded key).
Now if I launch the mongo shell, all my commands work fine (show dbs, use xyz, db.abc.find() etc.)
If I try to specify host and port I get:
mongo --host 192.168.1.100 --port 27017 MongoDB shell version: 2.1.0 connecting to: 192.168.1.100:27017/test
show dbs Mon Apr 30 21:37:37 uncaught exception: listDatabases failed:{ "errmsg" : "need to login", "ok" : 0 }
If I add --ssl flag to launch mongo shell, it just hangs. While mongod spits out:
Mon Apr 30 21:40:53 [initandlisten] options: { keyFile: "/Users/tshrestha/Downloads/key.pem" }
Mon Apr 30 21:40:53 [initandlisten] journal dir=/data/db/journal
Mon Apr 30 21:40:53 [initandlisten] recover : no journal files present, no recovery needed
Mon Apr 30 21:40:53 [websvr] admin web console waiting for connections on port 28017
Mon Apr 30 21:40:53 [initandlisten] waiting for connections on port 27017
Mon Apr 30 21:41:16 [initandlisten] connection accepted from 192.168.1.102:64413 #1 (1 connection now open)
Mon Apr 30 21:41:53 [clientcursormon] mem (MB) res:14 virt:2419 mapped:0
I am on Mac OSX 10.7