How to Connect to Your VDS Server via SSH (Complete Guide)
Step-by-step SSH connection guide for Linux VDS: PuTTY, Terminal, key-based authentication, Path Panel firewall rules, and security best practices.
When to reinstall your server OS, pre-reinstall backup checklist, REXE control panel OS reinstall steps, and post-installation configuration guide for Linux servers.
Server reinstallation (OS reinstall) is the process of installing the operating system from scratch, returning the server to a clean state. This is used to resolve serious system issues, switch to a different operating system, or bring the server to a clean starting point. This guide covers when to reinstall, how to prepare, and the steps through the REXE control panel.
Consider reinstallation in these situations:
Reinstallation deletes ALL data on the disk. This action cannot be undone. Always take a backup before proceeding.
Before starting reinstallation, back up the following data:
# Backup web files
tar -czf /tmp/www-backup-$(date +%Y%m%d).tar.gz /var/www/
# Backup application directory
tar -czf /tmp/app-backup-$(date +%Y%m%d).tar.gz /opt/myapp/
# Transfer backups to remote server
rsync -avz /tmp/*-backup-*.tar.gz user@backup-server:/backup/
# MySQL/MariaDB all databases
mysqldump --all-databases -u root -p > /tmp/all-databases-$(date +%Y%m%d).sql
# Specific database
mysqldump -u root -p mydb > /tmp/mydb-$(date +%Y%m%d).sql
# PostgreSQL
pg_dumpall -U postgres > /tmp/postgres-all-$(date +%Y%m%d).sql
# Compress backups
gzip /tmp/*.sql
# Nginx configuration
tar -czf /tmp/nginx-config-$(date +%Y%m%d).tar.gz /etc/nginx/
# Apache configuration
tar -czf /tmp/apache-config-$(date +%Y%m%d).tar.gz /etc/apache2/
# SSH configuration and keys
tar -czf /tmp/ssh-config-$(date +%Y%m%d).tar.gz /etc/ssh/ /root/.ssh/
# Crontab
crontab -l > /tmp/crontab-backup-$(date +%Y%m%d).txt
# Full /etc directory
tar -czf /tmp/etc-backup-$(date +%Y%m%d).tar.gz /etc/
# Let's Encrypt certificates
tar -czf /tmp/letsencrypt-$(date +%Y%m%d).tar.gz /etc/letsencrypt/
# Custom certificates
tar -czf /tmp/ssl-certs-$(date +%Y%m%d).tar.gz /etc/ssl/
# All user home directories
tar -czf /tmp/home-backup-$(date +%Y%m%d).tar.gz /home/
# User list
cat /etc/passwd > /tmp/users-list.txt
cat /etc/group > /tmp/groups-list.txt
# Ubuntu/Debian
dpkg --get-selections > /tmp/installed-packages.txt
# RHEL/CentOS/AlmaLinux
rpm -qa > /tmp/installed-packages.txt
# List backup files and check sizes
ls -lh /tmp/*-backup-*.tar.gz
# Verify archive contents
tar -tzf /tmp/www-backup-*.tar.gz | head -20
# Verify backups reached remote server
rsync -avz --dry-run /tmp/*-backup-*.tar.gz user@backup-server:/backup/
Available options typically include:
- Operating System: Ubuntu 22.04 LTS
- Hostname: server-name.domain.com
- Root Password: [set a strong password]
- SSH Key: [add if available]
The reinstall process typically takes 5-15 minutes. The server will be inaccessible during this time. You'll receive an email notification when complete.
After the server is reinstalled:
# Connect via SSH
ssh root@server-ip
# Update the system
apt update && apt upgrade -y
# Create a new user (don't work as root)
adduser newuser
usermod -aG sudo newuser
# Secure SSH configuration
nano /etc/ssh/sshd_config
# PermitRootLogin no
# PasswordAuthentication no (if using SSH keys)
systemctl restart sshd
# Install and configure UFW
apt install ufw -y
ufw default deny incoming
ufw default allow outgoing
ufw allow ssh
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
# Essential tools
apt install -y curl wget git vim htop net-tools unzip
# Set timezone
timedatectl set-timezone UTC
# Enable NTP
timedatectl set-ntp true
# Transfer backups to server
rsync -avz user@backup-server:/backup/ /tmp/restore/
# Restore web files
tar -xzf /tmp/restore/www-backup-*.tar.gz -C /
# Restore database
mysql -u root -p < /tmp/restore/all-databases-*.sql
# Restore Nginx configuration
tar -xzf /tmp/restore/nginx-config-*.tar.gz -C /
nginx -t && systemctl restart nginx
# Restore SSL certificates
tar -xzf /tmp/restore/letsencrypt-*.tar.gz -C /
# Check all service statuses
systemctl list-units --type=service --state=running
# Web server
curl -I http://localhost
# Database
mysql -u root -p -e "SHOW DATABASES;"
# Firewall
ufw status verbose
Within the first 24 hours after installation, verify all services are working correctly. Especially check SSL certificate validity and auto-renewal settings.
Server reinstallation is a smooth process when properly prepared. With comprehensive backups, careful installation parameter selection, and systematic post-installation configuration, you can quickly restore your server to its previous state. The REXE control panel makes this process achievable in just a few clicks.
OS reinstall through the REXE control panel typically takes 5-15 minutes. This time may vary depending on the selected operating system and server hardware. You'll receive an email notification when the process is complete.
No, your IP address does not change during reinstallation. You can continue connecting to your server with the same IP address. However, since the SSH host key changes, you may receive a 'host key changed' warning when connecting.
Technically possible but strongly not recommended. Reinstallation deletes all data on the disk and this action cannot be undone. Always back up your important data and verify the backups are accessible before proceeding.
Ubuntu 22.04 LTS is recommended for general use: it offers broad community support, long-term security updates, and comprehensive documentation. For enterprise environments, AlmaLinux 9 (RHEL compatible) may be preferred. Choose based on your application's requirements.
This is normal. The SSH host key changes after reinstallation. On your local machine, run 'ssh-keygen -R server-ip' to remove the old key, then reconnect and confirm the new key.
Step-by-step SSH connection guide for Linux VDS: PuTTY, Terminal, key-based authentication, Path Panel firewall rules, and security best practices.
Complete guide to connecting to Windows Server VDS via Remote Desktop (RDP): setup steps, NLA security, Path Panel firewall rule, and troubleshooting tips.
Step-by-step guide to changing your VDS server OS via REXE panel: backup tips, supported Linux distributions and Windows Server versions explained.