
Linux VDS Getting Started Guide: SSH, Security and Core Commands
New to Linux servers? Learn how to connect over SSH, run the essential commands, harden the firewall and lock down your VDS on day one.
Linux VDS Getting Started Guide
You bought a Linux VDS and now you are staring at a blank terminal. This guide takes you from the first login to a properly hardened server, one step at a time.
Connecting Over SSH
Linux servers are managed through SSH (Secure Shell).
Connecting From Windows (PuTTY)
- Download PuTTY
- Enter your server IP in the Host Name field
- Port: 22, Connection type: SSH
- Click “Open”
- Enter your username and password
Connecting From a Terminal (macOS or Linux)
ssh root@YOUR_SERVER_IPConnecting With an SSH Key (Recommended)
# Generate an SSH key
ssh-keygen -t ed25519 -C "your@email.com"
# Copy the key to the server
ssh-copy-id root@YOUR_SERVER_IP💡 Key based authentication is far safer than passwords. On Xeon Enterprise VDS and Ryzen Premium VDS plans you have full root access, so you can configure security exactly the way you want.
Core Linux Commands
Files and Directories
# Show the current directory
pwd
# List directory contents
ls -la
# Create a directory
mkdir new_folder
# Change directory
cd /home/username
# Copy a file
cp source.txt target.txt
# Move a file
mv old_path.txt new_path.txt
# Delete a file
rm file.txt
# Delete a directory and everything in it
rm -rf folder_nameSystem Information
# Disk usage
df -h
# RAM usage
free -h
# CPU details
lscpu
# Running processes
htop # or top
# System uptime
uptimePackage Management (Ubuntu and Debian)
# Refresh the package list
sudo apt update
# Upgrade installed packages
sudo apt upgrade -y
# Install a package
sudo apt install package_name -y
# Remove a package
sudo apt remove package_nameFirst Security Steps
1. Change the Root Password
passwd root2. Create a Regular User
Working as root all day is a habit worth breaking:
# Create a new user
adduser new_user
# Grant sudo rights
usermod -aG sudo new_user3. Change the SSH Port
Moving off port 22 will not stop a targeted attacker, but it removes most of the automated brute force noise:
# Edit the SSH configuration
sudo nano /etc/ssh/sshd_config
# Change the Port line
Port 2222
# Restart the SSH service
sudo systemctl restart sshd4. Disable Root Login Over SSH
# In /etc/ssh/sshd_config
PermitRootLogin no
PasswordAuthentication no # only if you use SSH keys5. Configure the Firewall (UFW)
# Install UFW
sudo apt install ufw -y
# Allow the SSH port
sudo ufw allow 2222/tcp
# Allow HTTP and HTTPS
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
# Enable the firewall
sudo ufw enable
# Check the status
sudo ufw status6. Install Fail2Ban
Automatic protection against brute force attempts:
# Install
sudo apt install fail2ban -y
# Create a local configuration file
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
# Start the service
sudo systemctl enable fail2ban
sudo systemctl start fail2banAutomatic Updates
To install security patches without babysitting the server:
sudo apt install unattended-upgrades -y
sudo dpkg-reconfigure -plow unattended-upgradesAdding Swap Space
Swap gives you a safety margin when RAM runs short:
# Create a 2 GB swap file
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
# Make it persistent
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstabMonitoring
Live Process Monitoring With htop
sudo apt install htop -y
htopDisk I/O Monitoring
sudo apt install iotop -y
sudo iotopConclusion
Linux server administration looks intimidating for about a week. Once the core commands and the security basics click, you have an extremely capable and flexible platform. Every White Bilişim VDS plan ships with full root access, so nothing here is off limits.
👉 Browse Xeon Enterprise VDS for your first Linux server, Ryzen Premium VDS when you need more headroom, or a backup server to keep your data on a separate machine.