Skip to main content

Command lines to provision and install main SSL?

Comments

7 comments

  • sparek-3
    If you have the correct certificate to install, then see: WHM API 1 Functions - install_service_ssl_certificate - Software Development Kit - cPanel Documentation To use this from the command line, you would do something like: /usr/local/cpanel/bin/whmapi1 install_service_ssl_certificate service=cpanel crt=%urlencodedcert% key=%urlencodedkey% cabundle=%urlencodedcabundle% Although probably the easiest and quickest solution for you, would be to just generate and install a self-signed certificate WHM API 1 Functions - reset_service_ssl_certificate - Software Development Kit - cPanel Documentation From the command line this would be: /usr/local/cpanel/bin/whmapi1 reset_service_ssl_certificate service=cpanel This will install a self-signed certificate for your WHM access. Probably not ideal, but it will at least get you into the WHM. I'm not sure if this restarts cPanel or not, so for good measure, restart cPanel after installing the certificate: /scripts/restartsrv_cpsrvd
    0
  • ottdev
    In my panic, I forgot I recorded those commands before. First fix the hostname if you haven't: hostname myserver.hostname.tld Then attempt to reissue a cert: whmapi1 reset_service_ssl_certificate service=cpanel If it gives you "Invalid license file" then run this: /usr/local/cpanel/cpkeyclt If that succeeds run again: whmapi1 reset_service_ssl_certificate service=cpanel
    0
  • ottdev
    Not working. I did get into the WHM with default self-signed cert, then went to reinstall the real cert for the services. I am back to certificate revoked again.
    0
  • sparek-3
    Unfortunately, I don't know enough about cPanel's AutoSSL system. I don't know why it was revoked or how you tell AutoSSL to reissue a certificate that been revoked. But if the certificate has been revoked, then reinstalling the revoked certificate won't help you. As you saw, it will just lead you back to where you started. You would need to have a new certificate issued. I don't know if AutoSSL even has that functionality, since it's all automatic. There's not a whole lot of control of AutoSSL. The instructions I gave were meant to just give you access back into your WHM.
    0
  • ottdev
    I also need to increase a disk quota for a user - how can I force this by command line since I can't access WHM ?
    0
  • sparek-3
    Your best bet would be to install the self-signed certificate and access your WHM using it. Perhaps someone else will chime in here and tell you how to resolve your AutoSSL revoked issue.
    0
  • cPanelMichael
    My hostname reverted again after a reboot. AutoSSL Revoked

    Hello, Could you verify which version of cPanel is installed on your system? This issue was addressed in cPanel 68.0.16 with a case that defers the revocation of old hostname certificates until the new hostname passes domain control validation: Fixed case CPANEL-12824: Defer revocation of old hostname cert until new hostname passes DCV. Thank you.
    0

Please sign in to leave a comment.