-
-
Save jcroot/4997ac679f7c19b76e0c3f9a19879628 to your computer and use it in GitHub Desktop.
Revisions
-
BrunIF revised this gist
Sep 24, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,4 +33,4 @@ certbot certonly --manual --preferred-challenges dns -d *.${SERVER_NAME} # Rename certificates name to serveo use cp /etc/letsencrypt/live/${SERVER_NAME}/cert.pem /etc/letsencrypt/live/${SERVER_NAME}/ssh.crt cp /etc/letsencrypt/live/${SERVER_NAME}/privkey.pem /etc/letsencrypt/live/${SERVER_NAME}/ssh.key serveo -private_key_path=$HOME/.ssh/id_rsa -cert_dir=/etc/letsencrypt/live/${SERVER_NAME}/ -domain=${SERVER_NAME} -port=22 -http_port=80 -https_port=443 -allow_ssh_on_https_port -
BrunIF created this gist
Sep 24, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ #!/bin/bash # Change `site.com` - to own name read SERVER_NAME sudo -s # Change codepage export LC_ALL="en_US.UTF-8" export LC_CTYPE="en_US.UTF-8" # Update and install software apt update apt install git python-minimal ssh-keygen # Get serveo mkdir /opt/serveo cd /opt/serveo wget https://storage.googleapis.com/serveo/download/2018-05-08/serveo-linux-amd64 mv ./serveo-linux-amd64 ./serveo chmod +x ./serveo ln -s /opt/serveo/serveo /usr/local/bin/ # Install Certbot-auto with dependencies cd /opt git clone https://github.com/certbot/certbot.git cd certbot && ln -s /opt/certbot/certbot-auto /opt/certbot/certbot && ./certbot ln -s /opt/certbot/certbot-auto /usr/local/bin/certbot apt install letsencrypt # Get certificates for all sub-domains certbot certonly --manual --preferred-challenges dns -d *.${SERVER_NAME} # Rename certificates name to serveo use cp /etc/letsencrypt/live/${SERVER_NAME}/cert.pem /etc/letsencrypt/live/${SERVER_NAME}/ssh.crt cp /etc/letsencrypt/live/${SERVER_NAME}/privkey.pem /etc/letsencrypt/live/${SERVER_NAME}/ssh.key serveo -private_key_path=$HOME/.ssh/id_rsa -cert_dir=/etc/letsencrypt/live/${SERVER_NAME}/ -domain=site.com -port=22 -http_port=80 -https_port=443 -allow_ssh_on_https_port