Jump to content

SSL Certificates

From KeenWiki
Revision as of 04:17, 14 March 2025 by 101.53.218.192 (talk) (Created page with "## Step-by-Step Guide to Using SSL Certificates on Linux and Windows ### **Linux** #### 1. Creating a Self-Signed SSL Certificate - Open your VPS console and log in using SSH. - Generate a private key: ```bash openssl genrsa -des3 -out self-ssl.key 2048 ``` - Create a Certificate Signing Request (CSR): ```bash openssl req -new -key self-ssl.key -out self-ssl.csr ``` - Generate the SSL certificate: ```bash openssl x509...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
    1. Step-by-Step Guide to Using SSL Certificates on Linux and Windows
      1. **Linux**
        1. 1. Creating a Self-Signed SSL Certificate
  - Open your VPS console and log in using SSH.
  - Generate a private key:
    ```bash
    openssl genrsa -des3 -out self-ssl.key 2048
    ```
  - Create a Certificate Signing Request (CSR):
    ```bash
    openssl req -new -key self-ssl.key -out self-ssl.csr
    ```
  - Generate the SSL certificate:
    ```bash
    openssl x509 -req -days 365 -in self-ssl.csr -signkey self-ssl.key -out self-ssl.crt
    ```
  This creates a self-signed SSL certificate[1].
        1. 2. Installing an SSL Certificate
  - Upload the certificate and key files to the server using SFTP.
  - Log in via SSH as the root user.
  - Move the certificate file to `/etc/httpd/conf/ssl.crt` and the key file to `/etc/httpd/conf/ssl.key`.
  - Restrict permissions for security:
    ```bash
    chmod 0400 /etc/httpd/conf/ssl.key
    ```
  - Edit the Virtual Host configuration in `/etc/httpd/conf.d/ssl.conf`, specifying paths for the certificate and key files.
  - Restart Apache:
    ```bash
    systemctl restart httpd
    ```
  This installs the SSL certificate on Linux servers without Plesk[2][5].
        1. 3. Using Command Line
  - Place the certificate and CA bundle in appropriate files:
    ```bash
    touch domain.com.crt domain.com.cabundle
    ```
  - Symlink files:
    ```bash
    ln -s domain.com.crt domain.com.crt.2025
    ln -s domain.com.key domain.com.key.2025
    ```
  - Restart Apache to load the new certificate[6].

---

      1. **Windows**
        1. 1. Creating a CSR
  - Open *Internet Information Services (IIS) Manager*.
  - In the left pane, select your server name, then double-click *Server Certificates*.
  - Click *Create Certificate Request* in the right pane.
  - Fill out required information (e.g., domain name, organization).
  - Save the CSR file to a location you can access later[3].
        1. 2. Installing an SSL Certificate
  - Obtain your SSL certificate from a Certificate Authority.
  - Save the `.cer` file to your server.
  - Open IIS Manager, select your server name, and double-click *Server Certificates*.
  - Click *Complete Certificate Request* and browse for your `.cer` file.
  - Bind the certificate to your site:
    1. Go to *Sites*, select your site, then click *Edit Bindings*.
    2. Add an HTTPS binding, select your new certificate, and set port 443[3][7].
        1. 3. Manually Installing Certificates
  For manual installation:
  - Open Microsoft Management Console (`mmc`) via Start > Run > `mmc`.
  - Add *Certificates* snap-in for "Computer account".
  - Right-click *Trusted Root Certification Authorities*, select *All Tasks > Import*, and follow prompts to import your `.cer` file[4].

This guide covers creating, installing, and configuring SSL certificates on both Linux and Windows systems effectively.

Citations: [1] https://www.crazydomains.co.nz/help/article/creating-a-self-signed-ssl-certificate-in-linux [2] https://www.linuxfoundation.org/blog/blog/classic-sysadmin-how-to-install-an-ssl-certificate-on-linux-server [3] https://www.digicert.com/kb/csr-creation-ssl-installation-iis-10.htm [4] https://support.securly.com/hc/en-us/articles/360026808753-How-do-I-manually-install-the-Securly-SSL-certificate-on-Windows [5] https://host4geeks.com/blog/how-to-install-an-ssl-certificate-on-linux/ [6] https://www.liquidweb.com/help-docs/installing-an-ssl-certificate-in-linux-command-line/ [7] https://comodosslstore.com/resources/install-a-windows-ssl-certificate-on-windows-iis-server/ [8] https://support.dnsimple.com/articles/ssl-certificate-with-windows/ [9] https://learn.microsoft.com/en-us/troubleshoot/windows-server/certificates-and-public-key-infrastructure-pki/install-imported-certificates [10] https://deliciousbrains.com/ssl-certificate-authority-for-local-https-development/ [11] https://www.entrust.com/knowledgebase/ssl/ssltls-certificate-installation-instructions-apache-linux [12] https://www.digitalocean.com/community/tutorials/openssl-essentials-working-with-ssl-certificates-private-keys-and-csrs [13] https://www.keyfactor.com/education-center/how-to-check-ssl-certificate/ [14] https://support.n4l.co.nz/s/article/Installing-an-SSL-Certificate-on-a-Windows-Device-Manually [15] https://discourse.metabase.com/t/how-to-enable-ssl-in-windows-server/26481 [16] https://learn.microsoft.com/en-us/answers/questions/1664138/how-to-set-ssl-need-basic-idea-and-step-by-step-im [17] https://support.n4l.co.nz/s/article/Deploying-an-SSL-Certificate-to-Multiple-Windows-Devices [18] https://docs.posit.co/how-to-guides/guides/install-ssl-certificates.html [19] https://serverfault.com/questions/62496/ssl-certificate-location-on-unix-linux [20] https://www.ssldragon.com/how-to/install-ssl-certificate/linux/

--- Answer from Perplexity: pplx.ai/share