This script is intended to be used on a fresh Debian 10 installation. His main purpose is to easily secure the OS.
- Restore the sources.list file with the default mirrors
- Update & upgrade
- Install sudo
- Secure SSH
- Disable IPv6
- Install UFW firewall
- Install Unattended Upgrades
$ su root
# cd /tmp
# wget https://raw.githubusercontent.com/Ph4ntom01/Debian-Secure-Config/main/debian_secure_config.sh
# chmod +x debian_secure_config.sh
# bash debian_secure_config.sh
To secure your server, either copy the private key to the remote client by using the script, or follow theses steps :
- First, make sure you copy you private key (located at /home/[user]/.ssh/[user]) to your client with a FTP software (ex: FileZilla).
- Second, uncomment and set PasswordAuthentication to no in the /etc/ssh/sshd_config file.
- Third, remove the private key from the server.