Creating SSH keys when a new virtual server is created.

1 post / 0 new
#1 Fri, 10/25/2019 - 16:33
hamiltonguy88

Creating SSH keys when a new virtual server is created.

I was messing around with ssh keys and was curious about setting up my users with ssh keys so I thought that I would enable this on my virtualmin server. I went into Webmin -> Servers -> SSH Server -> User SSH Key Setup. I enabled Setup SSH key for new Unix users and saved and applied the config. I then proceeded to create a new virtual server. When the virtual server was created with the new user, there was no .ssh for created. I then proceeded to create a different new user on the system using System -> Users and Groups. When I did this, it created the .ssh folder for the user and I was able to use the key to log in. I rebooted the server thinking some service needed to restart but when I created another new virtual server after the reboot, the .ssh folder was still not created. I looked through System Settings -> Virtualmin Configuration to see if there was a spot for keys there but I did not see anything. Maybe I am missing something simple or there is something else going on but if someone could help me out, it would be greatly appreciated. I am using Webmin version 1.921 and Virtualmin version 6.07. It is running on Ubuntu 18.04.2.