Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to Public Key Pinning

Discussion in 'General Discussion' started by Nirjonadda, Jan 24, 2018.

  1. Nirjonadda

    Nirjonadda Well-Known Member

    May 8, 2013
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Please let me know that it's possible to generate the PINs by accessing the server with PuTTY via SSH and the run?

    [root@na ~]# openssl rsa -in my-key-file.key -outform der -pubout | openssl dgst -sha256 -binary | openssl enc -base64
    Error opening Private Key my-key-file.key
    140399466469280:error:02001002:system library:fopen:No such file or directory:bss_file.c:402:fopen('my-key-file.key','r')
    140399466469280:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:404:
    unable to load Private Key
    [root@na ~]# openssl dgst -sha256 -binary public.key | openssl enc -base64
    public.key: No such file or directory
    [root@na ~]#
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    We don't support public key pinning natively in cPanel & WHM at this time, however I encourage you to vote and add feedback to the following feature request:

    Enhance SSL security: Public Key Pinning (HPKP)

    In the meantime, the following third-party URL offers information on how to implement this manually:

    HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd -

    Regarding the modifications to the Virtual Hosts in Apache for the domain name, this document offers instructions on how to add custom entries:

    Modify Apache Virtual Hosts with Include Files - EasyApache 4 - cPanel Documentation

    Note that mod_headers is compiled with Apache by default:

    # httpd -M|grep header
    headers_module (shared)
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice