Skip to main content

Is it possible create SSH keys to cPanel user account instead user root via API?

Comments

5 comments

  • cPRex Jurassic Moderator
    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
  • Otávio Serra
    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.

    Hi, Here you can see how to create this key:
    0
  • cPRex Jurassic Moderator
    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
  • Otávio Serra
    That key creation would be for the root user. You can create a standard SSH key for a user with the details here:
    0
  • cPRex Jurassic Moderator
    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.