Secured MongoDB With XFS for Superior performance – Access Instructions – Linux

Visits: 2340

Access Instructions to Secured MongoDB with XFS

These instructions refer to an AMI in AWS MarketPlace: https://aws.amazon.com/marketplace/pp/B0743JXYP2

To login to your server from a Linux Shell prompt  ssh -i location-of-your-key-file.pem ec2-user@publicDNS .

To login using other clients follow their directions.

The Database Password is your Instance-ID

The Password for scripts installed for the Floating Cloud Servers, including this MongoDB Server, use the Instance ID as a password. This can be found in the ec2 panel of AWS.

Only the ssh and Main MongoDB ports are open, we suggest that you limit external access to your server and only allow IPs that you need to connect to the Database, Do this with Security Groups. You can always select your current IP address or the IP address of the your application server.

The Username for MongoDB is floating

To login from your shell:

mongo admin -u floating  -p <INSTANCE-ID>

To login remotely from a server that has a MongoDB installed.

mongo mongodb://HOSTNAMEORIP:27017/admin -u  floating -p i-INSTANCE-ID

Only ports 22  and 27017 for ssh are exposed

Remote CLI connection to MongoDB using a password.

In the above command, “admin” is the DB name. The remote connection URL below has the DB name admin at the end. Use a different db name to connect to one that you created.

From the Mongo Shell you can see installed DB’s type”show dbs”

From here you can build, develop and learn,

You can download MongoDB drivers from https://docs.mongodb.com/ecosystem/drivers/

To connect your app remotely to MongoDB

Good luck!