Is it possible create SSH keys to cPanel user account instead user root via API?
I'm making some integrations with cPanel using WHM API1 and cPanel UAPI to create in my app some GIT repositories and intend to gave it access via SSH KEY. I use one root ssh key to make request to others cpanel's accounts globally. But I can't find options to make this keys owner to one cPanel user account, only option to made it for the user that make this requisition that is the root.
Anybody knows some fix to solve this? Is possible it from API or it's only for root's admin porpouse?
Thanks
-
Hey there! cPanel users also have a .ssh/authorized_keys file, so you could setup the key just same as you could with the root user. Just add the .pub version of the key to that file and you're all set. 0 -
That key creation would be for the root user. You can create a standard SSH key for a user with the details here: SSH Access | cPanel & WHM Documentation 0 -
There isn't an API call to handle user-level SSH keys. The link I provided does work for the user level, but isn't through the API. 0
Please sign in to leave a comment.
Comments
5 comments