If you want to completely re-install the operating system, then you need to do the following four steps in this odrer:
mprogrammerfor 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:
PasswordAuthentication no. Change this line to
Ctrl+x. Then type
yand then click
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 firstname.lastname@example.orgAnswer 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 updateThis may take two minutes or longer.
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 email@example.com from your local computer yet. If that is the case, then you need to run the command
ssh-keygen -R yourdomain.com