To manually upload an SSL certificate using SSH, follow these organized steps:
- Connect to your server via SSH:Replace
usernameandhost.comwith your actual credentials. - Navigate to the SSL directory on the server:
- Move into the directory or create it in the current location as needed.
- Create empty files for each SSL component (e.g., cert.pem, ca_bundle.pem, privateKey.pem):
- Transfer SSL files from your local machine:
- Replace paths with your server's directory structure.
- Alternative method: Paste directly into SSH session:
- Press Enter to start pasting, then press Ctrl+D to exit and save.
- Verify files:
- Log out of the SSH session when done:
- Type
exitorlogoutto terminate the connection.
- Type
Check each file after upload:
cat ssl/cert.pem
After creating the file on the server, paste the content:
cat - > ssl/cert.pem
Use SCP mode in SSH for secure and efficient transfer:
scp cert.pem username@host.com:/path/to/ssl/cert.pem
scp ca_bundle.pem username@host.com:/path/to/ssl/ca_bundle.pem
scp privateKey.pem username@host.com:/path/to/ssl/privateKey.pem
Use touch to create each file:
touch ssl/cert.pem
touch ssl/ca_bundle.pem
touch ssl/privateKey.pem
Create a new directory if needed:
mkdir ssl
Open a terminal and type:
ssh username@host.com
