# Linux Ubuntu 18.04 LTS Server Setup ### On remote machine #### As `root` 1. Change root password - `$ passwd` 1. Create user & their home directory - `$ useradd -m ` 1. Set user's password - `$ passwd ` 1. Make user a sudoer - `$ usermod -aG sudo ` 1. Set user's shell as bash - `$ chsh -s /bin/bash ` 1. Disconnect SSH session #### As `` 1. Install essentials - Update & upgrade - `$ sudo apt update && sudo apt upgrade` - Install `nano`, `curl` and `git` - `$ sudo apt install nano curl git` 1. Enable passwordless sudo for user - `$ sudo nano /etc/sudoers` - Add: ` ALL=(ALL) NOPASSWD: ALL` (after `includedir /etc/sudoers.d`) ### On local machine 1. Copy SSH public key to remote machine's authorized keys - `$ ssh-copy-id -i @` ### On remote machine #### As `` 1. Edit SSH daemon configuration - `$ sudo nano /etc/ssh/sshd_config` - Disable root access - Edit: `PermitRootLogin no` - Disable password authentication - Edit: `PasswordAuthentication no` - Restart ssh service: `$ sudo /etc/init.d/ssh restart` 1. Configure locale - https://help.ubuntu.com/community/Locale - https://askubuntu.com/questions/89976/how-do-i-change-the-default-locale-in-ubuntu-server 1. Install Docker - https://docs.docker.com/engine/install/ubuntu 1. Install Docker Compose - https://docs.docker.com/compose/install/#install-compose-on-linux-systems