Debian Server Setup
In this post I describe how I set up my Debian servers. This is less of a tutorial and more of a documentation for me.
Basic setup
# install basic tools
apt install neofetch neovim
# add user
adduser username
usermod -aG sudo username
# copy ssh keys
mkdir -p /home/username/.ssh
cp .ssh/authorized_keys /home/username/.ssh/authorized_keys
chown username:username /home/username/.ssh/authorized_keys
Configure SSH by opening /etc/ssh/sshd_config
and setting the following settings:
PermitRootLogin no
PasswordAuthentication no
Restart SSH daemon: systemctl reload sshd
. After that you can logout as root and login again with username
.
Install docker
Follow this guide.
Create a docker group and add user(s) to it (see here):
groupadd docker
usermod -aG docker username
Test this by running docker run hello-world
as user username
.
Further stuff
Generate SSH key for server:
ssh-keygen -t ed25519 -C "hostname.tld"
For more information on SSH keys see here