Purchasing a new server is exciting, but you might wonder, "How do I actually access it?" If you've been given SSH credentials, connecting is straightforward. This guide will walk you through accessing your server securely using SSH (Secure Shell), whether you're on Windows, macOS, or Linux.
What You’ll Need
Before starting, ensure you have:
✅ Server IP Address (e.g., 178.18.243.142)
✅ SSH Port (usually 22)
✅ Username (commonly root for full access)
✅ Password (provided by your hosting provider)
In this example, we’ll use:
-
IP:
123.45.67.89 -
Port:
22 -
User:
root -
Password:
xxxxyEfdF25E16dc
Step 1: Open a Terminal or SSH Client
Linux & macOS Users
- Open the Terminal (search for "Terminal" in apps).
- Proceed to Step 2.
Windows Users
You have two options:
Option 1: Using PowerShell (Recommended for Windows 10/11)
- Press
Win + Xand select Windows Terminal or PowerShell. - Proceed to Step 2.
Option 2: Using PuTTY (Alternative GUI Method)
- Download PuTTY (if not installed).
- Open PuTTY, enter:
-
Host Name (or IP):
123.45.67.89 -
Port:
22 -
Connection Type:
SSH
-
Host Name (or IP):
- Click Open, then enter
rootand the password when prompted.
Step 2: Connect via SSH
Run the following command in your terminal (Linux/macOS/PowerShell):
ssh root@123.45.67.89 -p 22
(If the port is 22, you can omit -p 22.)
First-Time Connection Security Warning
You’ll see:
The authenticity of host '178.18.243.142' can't be established.
ECDSA key fingerprint is SHA256:xxxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
Type yes and press Enter.
Enter Your Password
Next, you’ll be prompted for the password:
root@178.18.243.142's password:
Paste or type: xxxxyEfdF25E16dc (the text won’t show for security).
Step 3: You’re In!
If successful, you’ll see a command prompt like:
root@your-server:~#
Now you have full control over your server!
Essential Next Steps
1. Change the Default Password
Running passwd will let you set a new, stronger password:
passwd
2. Secure Your Server
- Disable root login over SSH (use a sudo user instead).
- Set up SSH key authentication (more secure than passwords).
-
Configure a firewall (e.g.,
ufwon Ubuntu).
3. Update Your System
Run:
apt update && apt upgrade -y # For Debian/Ubuntu
yum update -y # For CentOS/RHEL
Troubleshooting Common Issues
❌ "Permission Denied"
- Double-check the username and password (they’re case-sensitive).
- Ensure you’re using
root(or the correct username).
❌ "Connection Refused" or "Port 22 Closed"
- Verify the server is running.
- Check if a firewall is blocking port
22. - Some hosts use a different SSH port—confirm with your provider.
❌ "SSH Command Not Found" (Windows)
- Enable OpenSSH:
- Go to Settings > Apps > Optional Features > Add "OpenSSH Client".
- Alternatively, use PuTTY.
Conclusion
Accessing your server via SSH is the first step toward managing your hosting environment. Once connected, prioritize security updates and strong authentication to protect your system.
Need further help? Consult your hosting provider’s documentation or leave a comment below! 🚀
🔐 Pro Tip: Always use SSH keys instead of passwords for better security! Learn how to set them up in our SSH Key Setup Guide.
Top comments (0)