Fresh installation of Ubuntu 20.04 on Kimsufi server
The first steps of the installation of a new distribution of Ubuntu 20.04 on Kimsufi (KS7) server comprises the following steps:
- basic installation from the OVH template and upgrade to 20.04 LTS
- setting network time protocol (NTP)
- securing SSH connexion
Basic installation from the OVH template and upgrade to 20.04 LTS
This step is simply performed by a connexion to Kimsufi interface on which you are directly prompted that your server is available for a fresh install. Clicking on "Réinstaller", you are then asked to choose your distribution (in my case, Ubuntu server 18.04 LTS). I chose a custom installation but did not change anything (except for the hostname and for my ssh public key that I added to allow for a secure SSH connexion). Once the installation performed, the connexion is done using
ssh root@IP
Upgrade to Ubuntu server 20.04 LTS is finally performed with:
apt update apt upgrade dist-upgrade do-release-upgrade -d
(the -d
command is used here to allow the upgrade since 20.04 LTS was still not officially released at the time of my upgrade). During the upgrade, I systematically chose to install the new version of some configuration files and I was also notified of a message on grub not being installed that I ignored. I finally rebooted and edited the file /etc/hostname
(with yet another reboot) to give the server its brand new name (with the corresponding update in the file /etc/hosts
)!
Setting network time protocol (NTP)
NTP allows to synchronize dates and times through internet. The former ntpd
program has been replaced by timedatectl
(documentation in French at this link) that provides the same features. The main command is timedatectl
that provides the current time status.
First, I switched to my timezone (Europe/Paris) by first checking the European time zones available:
timedatectl list-timezones | grep Europeand using
timedatectl set-timezone Europe/Paris
Then, I enabled time synchronization through NTP by first editing the configuration file /etc/systemd/timesyncd.conf
to add NTP servers (servers can be chosen among this list if you are located in France; otherwise, choose servers close to your location). Servers are sequentially after FallbackNTP
(and this line has to be uncommented). Finally, synchronization is allowed with:
timedatectl set-ntp trueand a last check of time status gives:
> timedatectl Local time: Fri 2020-07-17 15:57:06 CEST Universal time: Fri 2020-07-17 13:57:06 UTC RTC time: Fri 2020-07-17 13:57:06 Time zone: Europe/Paris (CEST, +0200) System clock synchronized: yes NTP service: active RTC in local TZ: no
Securing SSH connexion
SSH connexion is then secured by forbidding SSH authentication with the edition of /etc/ssh_config
and the addition of two lines:
ChallengeResponseAuthentication no PasswordAuthentication nofollowed by a reboot. Only ssh connexion will then be authorized. SSH public keys are stored in the user file
~/.ssh/authorized_keys
(with drwx------
on .ssh
and rights rw-r--r--
on the file).