Installing a self-signed SSL cert
How to create a new self-signed SSL cert in sftp gateway
Use the following command to SSH into the VM:
ssh -i private.key ec2-user@<ip-address> -p 2222
Next, elevate your privileges to root with the command:
sudo su
Then, change directories to /etc/nginx/ssl and run the command to install the self-signed SSL cert:
cd /etc/nginx/ssl
openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout website.key -out website.bundle.crt -extensions server_extension -config self-signed-ssl.cnf
If you list your files you will now see the self-signed SSL cert, the website cert and the website key.