Setup Linux Root Server

less than 1 minute read

Log-in via ssh

ssh root@ip

Create a user

useradd username

Add user to the sudo group

usermod -aG sudo username

Enable login via ssh key for a user

On a client, generate a key pair

then, copy the key to the server:

ssh-copy-id -f -i users-key-file_rsa.pub username@ip

Disable login via password

Enable unattended upgrades

apt-get update
apt-get install unattended-upgrades

‘unattended-upgrades’ comes already with a good default configuration. No further steps required.

Categories: ,

Updated: