Login & Change root password
ssh root@IP_ADDRESS
passwd
Installing Software Updates
apt-get update && apt-get upgrade
Setting the Hostname
hostnamectl set-hostname HOSTNAME
hostname
choose [3 vim.basic]
select-editor
Update /etc/hosts
vi /etc/hosts
IPv4 HOSTNAME
IPv6 HOSTNAME
Setting the Timezone
dpkg-reconfigure tzdata
date
Restart cron
service cron status
Add a User Account
adduser USERNAME
adduser USERNAME sudo
Create a SSH folder for USERNAME
su USERNAME
mkdir ~/.ssh && chmod 700 ~/.ssh
touch ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys
Upload SSH key via Local MAC
ssh-keygen -b 4096
scp ~/.ssh/id_rsa.pub USERNAME@IP_ADDRESS:~/.ssh/authorized_keys
Configure SSH Daemon
vi /etc/ssh/sshd_config
PermitRootLogin no (yes)
Port 12345 (22)
AddressFamily inet #IPv4 only
Restart ssh
sudo systemctl restart ssh