Atavism Linux Server Install – Secured

 

 

You will need to create a SSH keyfile so that you can authenticate with this server in a secure fashion. You need to execute this as the ubuntu user, do not use sudo for the ssh-keygen command. You may name this key anything you want by replacing “My key for My Atavism Server” below.

ssh-keygen -t ed25519 -C “My key for My Atavism Server”

sudo cat /home/ubuntu/.ssh/id_ed25519.pub >> /home/ubuntu/.ssh/authorized_keys

sudo su websiteuser
ssh-keygen -t ed25519 -C “My key for My Atavism Server”
cat /home/websiteuser/.ssh/id_ed25519.pub >> /home/websiteuser/.ssh/authorized_keys
exit

sudo nano /etc/ssh/sshd_config

 

*Note if your adding a remote webserver, wait to disable this until after doing so for ease of setup.

Change the following settings to these values

ChallengeResponseAuthentication no

PasswordAuthentication no

PubkeyAuthentication yes

PermitRootLogin no

UsePAM no

 

Add the following into the file at the bottom and save the file. 

 

AuthorizedKeysFile /home/ubuntu/.ssh/authorized_keys /home/websiteuser/.ssh/authorized_keys

 

Execute the following command to restart your SSH service. 

sudo service ssh restart

 

Using WinSCP, browse to the folder /home/ubuntu/.ssh/ and download the keys to your local machine.