> ## Content Index
> Fetch the complete content index at: https://blog.esadax.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Installing an SSL Certificate on Apache via SSH
- URL: https://blog.esadax.com/en/installing-an-ssl-certificate-on-apache-via-ssh/
- Published: 2026-11-15T04:16:18.000Z
- Updated: 2026-11-15T04:16:18.000Z
- Author: Esadax 
- Tags: #tr-faq-06-ssl-installing-an-ssl-certificate-on-apache, #en, #mdx-imported, FAQ

To manually upload an SSL certificate using SSH, follow these organized steps:

1. **Connect to your server via SSH:**
  - Open a terminal on your local machine.
  - Type the command: `ssh user@example.com` where `user` is your username and `example.com` is your server's hostname.
2. **Navigate to the appropriate directory:**
3. **Create a new directory for SSL files (optional):**
4. **Create an empty file for the SSL certificate:**
5. **Copy the SSL certificate contents to the server:**
  - Copy the SSL certificate from your local machine to the terminal.
  - Press `Ctrl+D` to save the file.
6. **Verify the SSL certificate:**
7. **Repeat for CA bundle and private key (if needed):**
  - Create files for each additional required file (e.g., `ca_bundle.crt` and `private_key.pem`).
  - Upload their contents similarly.
8. **Check for errors:**
  - Ensure all files are correctly formatted without extra spaces or lines.

Remove any empty or incorrect files using:

```bash
rm -f /etc/ssl/certs/file_name

```

Check if the file was created correctly by viewing its contents:

```bash
cat /etc/ssl/certs/server.crt

```

Use `cat >> /etc/ssl/certs/server.crt` and paste the content, ensuring no extra lines are added:

```bash
cat >> /etc/ssl/certs/server.crt

```

Use `touch` to create an empty file, e.g., `server.crt`:

```bash
touch server.crt

```

Create a subdirectory within `/etc/ssl`:

```bash
mkdir -p /etc/ssl/certs

```

Use the `cd` command to move to the desired location, such as certificates:

```bash
cd /etc/ssl/certs

```