This website is deprecated, and remains online only for historic access to old issues and docs for historic versions of Virtualmin. It has been unmaintained for several years, and should not be relied on for up-to-date information. Please visit www.virtualmin.com instead.
If it's the same keys for every domain, put it in /etc/skel/.ssh/authorized_keys. That gets copied into every new domain user home (by default; the skel directory is configurable in Server Templates). That's pretty much the same answer to any "how do I put some specific files into the domain home directory on during creation".
If it needs to be custom keys for each domain, I'm not sure of the easiest way to go about that. You could use "Commands to run after making changes to a server" (in Virtualmin Configuration->Actions upon server and user creation), which could be used to copy keys from a specified location, maybe with substitution of the domain name (using the $DOM variable).
If it's the same keys for every domain, put it in
/etc/skel/.ssh/authorized_keys
. That gets copied into every new domain user home (by default; the skel directory is configurable in Server Templates). That's pretty much the same answer to any "how do I put some specific files into the domain home directory on during creation".If it needs to be custom keys for each domain, I'm not sure of the easiest way to go about that. You could use "Commands to run after making changes to a server" (in Virtualmin Configuration->Actions upon server and user creation), which could be used to copy keys from a specified location, maybe with substitution of the domain name (using the
$DOM
variable).--
Check out the forum guidelines!
Hello, the Skel directory ought to do it! Thanks!
The second part of your answer is intriguing on many levels, so thanks for that also!
--jason