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 net-tools # Fedora dnf install -y neofetch htop tree ncdu ranger zsh vim neovim git curl wget util-linux-user Create Sudo User # Debian adduser aimer usermod -aG sudo aimer # Fedora useradd -G wheel aimer passwd aimer Test Root Privileges su - aimer sudo cat /etc/shadow Setup SSH Public Key Quickly Upload Your Local Key # run this on your local machine ssh-copy-id aimer@server Import The Key You Hosted # Import your own public key! wget https://aimer.aiursoft.cn/authorized_keys -O ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys Test if You Can Connect to Server ssh aimer@server Disable Root and Password Login sudo vim /etc/ssh/sshd_config Set PermitRootLogin as no To disable root login Set PasswordAuthentication as no To disable password login Delete this file /etc/ssh/sshd_config.d/50-cloud-init.conf ...