Server Setup

How to Setup Your New Linux Server

Update system # Debian apt update # Fedora dnf update Install most used tools # Debain apt install -y neofetch htop tree ncdu ranger zsh vim neovim git curl wget lsd batcat # Fedora dnf install -y neofetch htop tree ncdu ranger zsh vim neovim git curl wget lsd bat Create sudo user # Debian adduser aimerneige usermod -aG sudo aimerneige # Fedora useradd -G wheel aimerneige passwd aimerneige Test root privileges su - aimerneige sudo cat /etc/shadow Setup SSH public key # run this on your local machine ssh-copy-id aimerneige@server Test if you can connect to server ssh aimerneige@server Disable root and password login sudo vim /etc/ssh/sshd_config Set PermitRootLogin as no To disable root login Set PasswordAuthentication ad no To disable password login Skip password for sudo sudo visudo Add this on the end of file:...

May 17, 2022 · Aimer Neige