Server!/Horror! I have a magnet and I don't mind using it!

Notes on: Setting up a new Server

A typical Machine

Prepare Stuff as root

passwd -l root
apt-get install sudo
adduser $SYSTEM_USER
adduser $SYSTEM_USER adm
adduser $SYSTEM_USER staff
adduser $SYSTEM_USER sudo
su - $SYSTEM_USER
sudo -l # verify $SYSTEM_USER can actually use sudo...
exit
exit

Now work with $SYSTEM_USER

sudo apt-get update
sudo apt-get upgrade --yes
sudo apt-get install --yes vim
sudo apt-get remove --purge --yes nano
sudo update-alternatives --display editor|head -n2
sudo apt-get install procps lsof lsb-release bash-completion curl git-core -y
source ./etc/bash_completion
grep -q -i '^PermitRootLogin' /etc/ssh/sshd_config && sudo sed -i.bak -e 's/^PermitRootLogin (.*)/PermitRootLogin no/' /etc/ssh/sshd_config
sudo pkill -SIGHUP -u root -f /usr/sbin/sshd

Generated: 2017-11-02 10:20:47 +0100