# Install sshd
sudo apt install ssh -y
sudo systemctl enable --now ssh

# Configure firewall to allow ssh
sudo ufw allow ssh

# Check firewall
ufw status verbose
# sudo ufw delete allow ssh # disallow ssh through firewall

# Configure ssh to enable root login - please make sure that root has a password
sudo sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config

# Set gracetime
sudo sed -i 's/#LoginGraceTime 2m/LoginGraceTime 2m/' /etc/ssh/sshd_config

# restart sshd
sudo systemctl restart sshd