Trying to link SSL but permissions issues

Keywords: Nginx - AWS - Technical issue - Secure Connections (SSL/HTTPS)
bnsupport ID: 81692427-11c2-850f-7b87-992b5dcf31b1
Description:
Following these directions: https://docs.bitnami.com/general/how-to/generate-install-lets-encrypt-ssl/#alternative-approach to get SSL on my bitnami NGINX wordpress site.

I was able to generate a certificate but I cannot scp folder where keys are stored to utilize them.
/stack/letsencrypt/accounts: No such file or directory
and
scp: /opt/bitnami/nginx/conf/server.key: Permission denied

I generated a public key which is also on your server with command: ssh-keygen -t rsa
Then I try to copy output of cat ~/.ssh/id_rsa.pub to home/bitnami/.ssh/authorized_keys
it says permission denied. Also permission is denied when I try to follow these instructions: https://docs.bitnami.com/virtual-machine/faq/get-started/enable-ssh-keys/

Predictably on the next step, using NGINX Approach B gave me errors and I had to sudo unlink /opt/bitnami/nginx/conf/server.crt AND sudo unlink /opt/bitnami/nginx/conf/server.key to allow me to start again. But still not able to link the certs. Is there something I am missing?

I have been banging my head on this for months, please help.

I am using NGINX and SSHed into bitnami on a mac.

Thanks!

Hello @ongaku.sab,

Have you tried mounting the Volume and drag and drop the files? For that, go to Volumes tab, click on Mount, and then click on explore. You should be able to move files to the folder you want.

I hope it helps

Hi David,

Do you know how I would do that from the command line? I am using SSH to make changes.

Thanks,
Marian

Hello @ongaku.sab,

You could obtain your public SSH key by executing the command below on your local machine:

cat ~/.ssh/id_dsa.pub

Then, copy it to .ssh/authorized_keys inside the VM (access clicking on Open Terminal button). After that you should be able to access via SSH (or SCP) with:

ssh root@YOUR-VM-IP

Regards

I was able to copy the key into authorized_keys but not able to scp authorized_keys because
scp bitnami@myIP:/.ssh/authorized_keys/ /Users/me/ssl/
Enter passphrase for key ‘/home/bitnami/.ssh/id_rsa’:
scp: /.ssh/authorized_keys: No such file or directory
same with .ssh/id_rsa.pub
However I see both files in the directory! Why is it not finding them?

Hello @ongaku.sab,

Note that the path in the VM is:

/root/.ssh/authorized_keys

Regards

When I use scp root@myIP:/.ssh/authorized_keys/ /Users/me/ssl/
it says permission denied.

These are the instructions I am trying to use: https://docs.bitnami.com/aws/apps/wordpress-pro/administration/create-ssl-certificate-nginx/
Not even sure those are the ones I should follow.

Hey actually I used this guide (at least some of it) to do this easier.
https://docs.bitnami.com/aws/how-to/configure-elb-ssl-aws/
thanks for your help

Hi @ongaku.sab,

I’m glad to know that you managed to configure the SSL certificate for your site. However, if still get errors when connecting to your instance using a SSH connection or when running commands in the instance itself, please do not hesitate to ask.

Thanks

Thanks for the informations.