In linux,
If I added a file or a directory in /etc/skel
, when I create a user this get the file or dir in skel.
with
ssh-keygen -t rsa
I can create the ssh keys
how I can automatically create the ssh keys each time when I added a user?
In linux,
If I added a file or a directory in /etc/skel
, when I create a user this get the file or dir in skel.
with
ssh-keygen -t rsa
I can create the ssh keys
how I can automatically create the ssh keys each time when I added a user?
man adduser under debian:
If the file /usr/local/sbin/adduser.local exists, it will be executed after the user account has been set up in order to do any local setup.
You should write a wrapper script around useradd
that runs ssh-keygen
and anything else you need when you create an account.