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.

Preparation

For the first two steps you need to login as root via ssh. All subsequent steps should be done as you new sudo user that you create in step two. However, suggestion is to open two terminals/sessions as root user to the server and only work in one of the terminals for the first three steps (IPv6, SUDO and SSHD setup) and have the other one available if something does not work. After the third step is verified, you can close the second terminal/session.

Enable IP v6

This is a specific thing with contabo: Per default, IPv6 is NOT enabled, and can only be

Set up SUDO

1) Login into server as root, 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 now

Update Ubuntu

sudo apt update && sudo apt upgrade

Set up other applications/servers

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

asd

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