Storing SSH login credentials?

I am creating a web application that involves logging into servers via SSH and storing the details. Credentials will include root login details.

What are the best practices for storing this data safely and securely? Authentication using asymmetrical keys will be used be used but not the concern here.

The plan is to use MongoDB and Node.js.

The best way to encrypt data that is extremely sensitive like that, is to use AES 256.

You'll basically want to AES256 encrypt the login credentials in some sort of file (like a CSV), and make sure the encrypt key is stored somewhere extremely safe (on a computer not connected to the internet, for instance).

This is really the only way to handle that sort of information.