Benutzer-Werkzeuge

Webseiten-Werkzeuge


contabo:setup

Dies ist eine alte Version des Dokuments!


Contabo server setup

Just after setup of Ubuntu 20.04 server there are several things to do. For the very first step you need to login as root via ssh, but all subsequent steps should be done as you new sudo user.

Set up SUDO

This might be a bit tricky, suggestion is to actually login into the server using two ssh terminals/sessions as root, and use one of the terminals to work and the other to fix things if they go wrong. ;-)

1) Add a user, make her part of sudo group

adduser jrathert
adduser jrathert sudo

2) Log out and in as the new user and try if sudo works (by updating the apt database)

sudo apt update

3) If everything worked, disable the root account (by deleting and locking it, see man passwd)

sudo passwd -dl root

Set up SSH

Make sure ssh daemon listens on different port and does not allow root login:

  • Set Port 3141
  • Set PermitRootLogin no # or comment our yes
sudo nano /etc/ssh/sshd_config  # do changes above
sudo systemctl restart sshd

Now use different terminal to check if login works with new port

ssh -p 3141 jrathert@<server>  

If everything works, you can and should close all other (root) terminals / sessions to the server!

Update Ubuntu

sudo apt update && sudo apt upgrade

Enable IP v6

Set up other applications/servers

  1. Reconfigure ssh daemon (port)
  2. Set up relevant servers: Apache, MariaDB, Exim - see separate documents

asd

contabo/setup.1635767345.txt.gz · Zuletzt geändert: 2021/11/01 12:49 von jodoc