Exclusive Metin2 game shield on FreeBSD: Automatic siege mode, VIP list, and whitelist from your dashboard. See how it works
Create a server
Xernode/ Blog/#ssh

Blog

#ssh

Posts tagged with “ssh”.

How to Enable Two-Factor Authentication (2FA) for SSH

  • Xernode
  • 3-minute read
  • ssh

With two-factor authentication, logging in via SSH requires two things: your SSH key (or your password) and a 6-digit code that changes every 30 seconds on your phone. Even if someone steals your private key, they won’t be able to log in without your phone. This guide sets it up on Ubuntu and Debian using the Google Authenticator PAM module, which works with any TOTP app, such as Google Authenticator, Aegis, or 2F…

… Read the complete guide

How to Deploy to Your VPS Using GitHub Actions

  • Xernode
  • 4-minute read
  • ssh

Uploading changes via FTP or connecting via SSH to make git pull works—until the day you forget a file or deploy the wrong branch. With GitHub Actions, every push to the main branch copies the code to the VPS and restarts the application—always in the same way.

How It Works

  1. You go from push to main.
… Read the complete guide

How to Set Up a Git Server on a VPS

  • Xernode
  • 1-minute read
  • ssh

A bare repository on your VPS works as a private SSH remote without GitHub.

Steps

  1. Install Git and create the service user:

    sudo apt update
    sudo apt install -y git
    sudo adduser --system --shell /bin/bash --group --disabled-password --home /home/git git
  2. Authorize your public key for the git user:

… Read the complete guide

How to Change the SSH Port on Linux

  • Xernode
  • 1-minute read
  • ssh

Moving SSH off port 22 cuts bot noise. Do it carefully: open the new port in the firewall before you close the old one.

Steps

  1. Edit the sshd configuration:

    sudo nano /etc/ssh/sshd_config
  2. Set (or uncomment) a Port line with your chosen port, e.g. 2222. Save the file.

    Port 2222

Tips

… Read the complete guide

How to Add a New User in Linux

  • Xernode
  • 1-minute read
  • ssh

A dedicated sudo user is safer than living as root. Create the account, grant privileges, then install your SSH key.

Steps

  1. Create the user (Ubuntu/Debian will ask for password and details):

    sudo adduser deploy
  2. Add them to the sudo group:

    sudo usermod -aG sudo deploy

Tips

… Read the complete guide

How to Secure Your VPS with Fail2Ban

  • Xernode
  • 1-minute read
  • ssh

Fail2Ban reads logs and blocks IPs after repeated failures. On a public VPS it cuts SSH brute-force without hand-writing iptables rules.

Steps

  1. Install Fail2Ban (Ubuntu/Debian):

    sudo apt update
    sudo apt install -y fail2ban
  2. Create a local jail file so package upgrades do not overwrite you:

… Read the complete guide