Automatically Add SSH Keys on Account Creation

keddie

Well-Known Member
Nov 17, 2007
50
0
56
Can anyone suggest a way for me to have a custom authorized_keys file added to each new account when it is created?

I have a template authorized_keys file that is prepopulated with my main admin pubkeys, it would simplify things a lot for me if I didn't have to manually add them each time.

Al
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Can anyone suggest a way for me to have a custom authorized_keys file added to each new account when it is created?

I have a template authorized_keys file that is prepopulated with my main admin pubkeys, it would simplify things a lot for me if I didn't have to manually add them each time.

Al
You could write a /scripts/postwwwacct shell script to do that. Documentation for /scripts/postwwwacct is available at:

ScriptHooks < AllDocumentation < TWiki
 

keddie

Well-Known Member
Nov 17, 2007
50
0
56
Thanks

Thanks for your replies, that should make my user admin a little easier :)