Objective. Students provision a virtual private server (VPS) on a cloud platform, assign SSH key authentication, and verify remote access from their local machine.
This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.
VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.
A virtual private server (VPS) is a slice of a physical server that runs its own operating system and behaves like a dedicated machine. Cloud providers such as DigitalOcean, Linode/Akamai, and AWS Lightsail carve large bare-metal servers into many isolated VPS instances using a technology called virtualization. Each instance gets its own CPU allocation, RAM, disk, and public IP address.
For web developers, a VPS is often the first "real" server they manage. Unlike shared hosting, you have root access, which means you can install any software, configure the firewall, and deploy applications exactly as needed. With that power comes responsibility: a misconfigured VPS can expose user data or become a platform for attacks against others.
All major providers offer a web console where you create and manage instances. Common choices for learners include:
When creating an instance, you choose an operating system image. This lab uses Ubuntu LTS (Long-Term Support), which receives security updates for several years and is widely documented. Always prefer the latest LTS release so your system stays supported.
You also select a region (the data center closest to your users or lowest in latency to you), a plan tier (the combination of CPU, RAM, and disk), and a monthly cost. Entry-level plans on most providers start under $10/month. Record all of these details in your lab log — future troubleshooting often depends on knowing exactly what was provisioned.
Secure Shell (SSH) is the standard protocol for remote terminal access to Linux servers. By default, a new VPS may allow password login, but password authentication is a security risk because automated bots constantly scan the internet for SSH ports and attempt brute-force logins.
Key-based authentication replaces the password with a mathematically linked pair of files:
This lab uses the Ed25519 algorithm, which is modern, compact, and considered strong by current standards. Older RSA keys still work, but Ed25519 is the current best practice.
On your local machine, open a terminal and run:
```
ssh-keygen -t ed25519 -C "your_email@example.com"
```
Accept the default file location (`~/.ssh/id_ed25519`) or choose a custom path. You will be prompted to enter a passphrase. Use a passphrase — it encrypts the private key on disk so that if your laptop is stolen, the key cannot be used without the passphrase.
The command produces two files:
Most cloud consoles let you paste the contents of `id_ed25519.pub` into a field during instance creation. Copy it with:
```
cat ~/.ssh/id_ed25519.pub
```
Then paste the output into the provider's SSH key field. The provider injects it into `/root/.ssh/authorized_keys` on the new instance automatically.
Once the instance is running (usually within 60 seconds), connect from your terminal:
```
ssh root@<your-server-ip>
```
If your key is in the default location, OpenSSH finds it automatically. If you used a custom path:
```
ssh -i ~/.ssh/id_ed25519 root@<your-server-ip>
```
On first connection, SSH displays a host fingerprint and asks you to confirm. Verify the fingerprint matches what the cloud console shows (some providers display it on the instance detail page) before typing `yes`. This protects against a man-in-the-middle attack where someone intercepts your connection.
Once you have root access, a few immediate steps protect the server:
1. Update packages — run `apt update && apt upgrade -y` to apply security patches.
2. Disable password authentication — edit `/etc/ssh/sshd_config` and set `PasswordAuthentication no`, then restart SSH. This closes the door to brute-force attacks.
3. Firewall — Ubuntu's `ufw` (Uncomplicated Firewall) lets you allow only the ports you need (`ufw allow OpenSSH`, then `ufw enable`).
4. Do not store sensitive credentials on the server in plain text — use environment variables or a secrets manager.
Accurate documentation is a professional habit. Your lab log entry must include: the provider name, instance name, region, Ubuntu LTS version, plan tier (CPU/RAM/disk), the server's public IP address, and the monthly cost estimate from the pricing page. Use the program's standard log template. Incomplete logs are a common reason students do not pass the lab check.
CompTIA Linux+ covers managing Linux systems, remote access, and basic security hardening — all practiced here. CompTIA ITF+ introduces foundational computing concepts including networking and cloud basics. Hands-on VPS work builds the operational context that makes those exam topics concrete.
Answer each question, then check it. Nothing is recorded; this is your own practice.
A free tech program — complimentary, as our commitment to get America working. Help us build VoTechWorks. Tell us what works, what doesn’t, and what you want to learn.