| 1. | AWS server |
| 2. | Domain |
| 3. | HTTPS |
| 4. | CGI and HTTP/2 |
| 5. | Simple CMS |
| 6. | Final customization |
| 7. | GY installation |
| 8. | Re-installation of OS |
| 9. | Docker update |
If you want to completely re-install the operating system, then you need to do the following four steps in this odrer:
mprogrammer for this tutorial. You may wish to select some other name. The command to create user is
sudo adduser mprogrammerMake sure you choose a password that is secure. We will set up the server so it can be accessed using the password only.
sudo usermod -a -G sudo mprogrammer
sudo nano /etc/ssh/sshd_config
PermitRootLogin. It is very likely that it starts with the symbol #. This means that the line is commented-out and inactive. You need to erase that leading # and modify it a bit so the line has the following form:
PermitRootLogin no
PasswordAuthentication no. Change this line to
PasswordAuthentication yes
Ctrl+x. Then type y and then click enter.
sudo rebootYou will need to wait for about two minutes before the server can be accessed again.
11.22.333.444. Type the following command in your terminal program.
ssh mprogrammer@11.22.333.444Answer yes to a few questions that the terminal may ask you.
ssh-keygen -R 11.22.333.444
sudo apt updateType your password and wait for the command to finish.
sudo apt upgradeThis may take two minutes or longer.
sudo reboot
The home page of the Amazon LightSail should display all instances that you have. You should click on the old instance, select the networking tab, and then locate the static IP address (in the panel called PUBLIC IP) and then click on the link that contains the custom name of the static IP address.
Now you will see the main page of the static IP address. You can click on the link detach.
After the static IP is detached, you will see a new menu with all available instances. You can select the newly created instance and attach the static IP to it.
You may not be allowed to use ssh mprogrammer@yourdomain.com from your local computer yet. If that is the case, then you need to run the command
ssh-keygen -R yourdomain.com