These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Generating ssh private key on virtual server creation on the new forum.
Is there any way to have VirtualMin create a private key upon virtual server creation? I configured it to only allow private key authentication to connect via ssh but I would like to be able to have their private keys generated as needed with new accounts if possible. I don't mind generating them manually but it would help if it is streamlined a little bit more.
P.S. - I've got nearly everything setup (finally). Hopefully I don't need to do this all over again as it was a pain to get everything just right. Mail was the worst thing to configure.
Howdy,
You may want to look into the settings in System Settings -> Server Templates -> Default -> Actions Upon User and Server Creation -> Command to run after making changes to a server.
Using that, you can have it execute a script of some sort that would generate the keys that you're after.
-Eric
Thanks. I'll look into that for sure.
EDIT: BTW, That's in Module Config not in Server Templates. I've enabled module configuration because I enabled auto private key generation elsewhere and it wasn't activating. I'll try it later to see if it works.
EDIT: Hmm... That didn't work. Guess I will need to write a script or resort to doing it manually (i.e. have them generate their own with their program then add the public key for them) -- actually they could do that themselves using FTP now that I think about it. :p
On the more recent Webmin version 1.8*. Part of that can be easily automated. One of the settings page is located at Webmin > Servers > SSH Server > User SSH Key Setup
Related documentation at http://doxfer.webmin.com/Webmin/SSH_Server
- - -
Senior Product Manager, and Co-Founder at Ubertus.org Inc.
Love back your Virtualmin & Webmin community