Skip to content

Latest commit

 

History

History
65 lines (60 loc) · 1.6 KB

linux-server-setup.md

File metadata and controls

65 lines (60 loc) · 1.6 KB

Server Setup: A simple personal cheatsheet

Note: This document is not completed.
This is my personal Linux Server Setup cheatsheet.

VPS

After buy a vps:

  1. change root pass
  2. make root inactive
  3. add new user
adduser mrht74
usermod -aG sudo mrht74```
3. update and upgrade
4. disable and remove cloud services and snapd
  - Reconfigure the cloud-init service, then deselect all the options:
  ```bash
  dpkg-reconfigure cloud-init
  • Remove cloud-init:
apt purge cloud-init
  • List the services which depend on network being online:
sudo systemctl show -p WantedBy network-online.target
  • disable the services and remove the open-iscsi package:
systemctl disable <service name>
apt remove open-iscsi
  • remove snapd:
apt purge snapd
  1. install python3-pip and python3 and git
  2. install vim and best config
  3. change the default SSH port
sudo vim /etc/ssh/sshd_config
  1. Enable 2FA (optional)
  2. use SSH keys
ssh-copy-id mrht74@Remote
  1. set ssh config on client
vim ~/.ssh/config 			
  1. set webmin Click here
  2. Set up a firewall
  3. Backup your server
  4. Set up monitoring
  5. Set up a mail server
  6. Install an (S)FTP server
  7. Telegram MTProto
    Click here
  8. start vpn server
    link 1 link 2