Topic: How to use net::ssh to create and use SSH keys ?


I've been looking around for a few hours now and didn't find a solution.

I'm building an app that is going to manage linux servers through SSH. The user will enter addresses and credentials but I don't want to store passwords which are subject to change in the database.
I need to create a SSH keypair from my rails app (in an initializer), store it in the database, push it on the servers authorized_keys file when I get the credentials and use it for later connections.

Can someone help me with that ?