Nodevism.com
  • Nodevism
    • Introduction
  • Mainnet
    • CrossFi
      • Installation
    • Medasdigital
  • Testnet
    • Aztec
    • Cortensor
    • Covalent
      • EWM Client
    • Dill.xyz
      • Dill light node
    • Empeiria
      • Endpoints
      • Requirement
      • Installation
    • Lumera Protocol
      • Public endpoint
      • Installation
      • Snapshot
      • Create Validator
      • CLI Cheatsheet
    • Odiseo
      • Installation
      • Creating Validator
      • Snapshot
      • CLI Cheatsheet
    • Symphony (Orchestra Labs)
      • Endpoint
      • Requirement
      • Installation
      • Create Validator
      • Cheatsheet
    • Union
      • Union ceremony task
    • XRVL-EVM
      • Public Endpoint
      • Installation
      • Creating Validator
      • Snapshot
      • CLI Cheatsheet
      • Cli Cheatsheet
  • Archive
    • Artela
      • Requirement
        • Public Endpoint
        • Installation
        • Create Validator
        • Upgrade
        • Snapshot
      • Testnet User Guide
    • CrossFi Chain
      • Endpoints
      • Installation
      • Upgrade
      • Validator Setup
      • Cheatsheet
      • How to create RPC,API, and Json-RPC
      • CrossFi user incentivized testnet guide
    • InitiaFDN
      • Endpoint
      • Run Initia Node
        • Installation
        • Creating validator
        • Setup Oracle
        • Cheatsheet
        • Upgrade
      • User Testnet Guide
    • Network3 AI
      • Installation
    • Nubit
      • Nubit Light Node
    • 0G_Labs
      • Page 2
    • Story protocol
    • Warden
      • Endpoint
      • Run Warden Node
      • Installation
      • Creating Validator
      • Cheatsheet
    • Zenrock
      • Public endpoint
      • Automatic installation
      • Manual installation
      • Creating validator
      • Usefull command
  • Other
    • Secure server settup (optional)
Powered by GitBook
On this page
  1. Other

Secure server settup (optional)

this method can skip...!!

sudo adduser <admin> --disabled-password -q
sudo usermod -aG sudo <admin>
sudo -u <admin> bash -c 'mkdir -p ~/.ssh && echo "YOUR_PUBLIC_SSH_KEY" >> ~/.ssh/authorized_keys && chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys'
echo "<admin> ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers
su - <admin> -c 'sudo sed -i "s|^PermitRootLogin .*|PermitRootLogin no|" /etc/ssh/sshd_config'
su - <admin> -c 'sudo sed -i "s|^ChallengeResponseAuthentication .*|ChallengeResponseAuthentication no|" /etc/ssh/sshd_config'
su - <admin> -c 'sudo sed -i "s|^#PasswordAuthentication .*|PasswordAuthentication no|" /etc/ssh/sshd_config'
su - <admin> -c 'sudo sed -i "s|^#PermitEmptyPasswords .*|PermitEmptyPasswords no|" /etc/ssh/sshd_config'
su - <admin> -c 'sudo sed -i "s|^#PubkeyAuthentication .*|PubkeyAuthentication yes|" /etc/ssh/sshd_config'
sudo systemctl restart sshd
sudo apt install -y ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw enable

change <admin> to your own user name

PreviousUsefull command

Last updated 7 months ago