- Install debian
- use any root password
- create new user with strong password
- Setup SSH
- add pubkey ssh-copy-id user@host
- Login SSH
- su -
- nano /etc/ssh/sshd_config
- Disable Root SSH
- Allow Pubkey
- Disable Password SSH
- PasswordAuthentication no
- restart sshd
- Re-login SSH
- Setup sudo
- su -
- apt install sudo
- add user to sudo group (usermod -aG sudo user)
- re-login
- test sudo (sudo -s)
- Disable su
- sudo nano /etc/pam.d/su
- Uncomment (auth required pam_wheel.so)
- test su (su -)
- Should be Permission denied
- Disable root account
- Post-setup Practice
- Now you are the solely admin who have privilege access
- Keep your private key secure
- Do not forget your password