- Home
- Knowledge base
- Getting Started
- Connecting to your VPS for the first time
Connecting to your VPS for the first time
RoyaleHosting Support
Introduction
Connecting to your VPS (Virtual Private Server) for the first time is an essential step to get started with your hosting. This guide walks you through the connection process using SSH (Secure Shell), the standard method for securely accessing Linux servers.
What you need
Before connecting, ensure you have:
- Your VPS IP address (provided in your welcome email)
- Your root password (also in the welcome email)
- A terminal application installed on your computer
- Basic familiarity with command line interfaces
Understanding SSH
SSH (Secure Shell) is a cryptographic network protocol that provides secure remote access to servers. It encrypts all data transmitted between your computer and the server, making it safe to use over public networks.
The default SSH port is 22, and you typically connect using:
ssh username@server_ip_address
For a new VPS, the default username is usually root.
Step-by-step connection process
Step 1: Locate your server credentials
After your VPS is provisioned, check your email for connection details. You should receive:
- Server IP address: Your server's public IP (e.g.,
185.123.45.67) - Root password: Initial password for the root user
- SSH port: Usually 22 (default)
Save these credentials in a secure password manager.
Step 2: Open your terminal
Windows:
- Open PowerShell (search for "PowerShell" in Start menu)
- Or install Windows Terminal for a better experience
macOS:
- Press
Cmd + Spaceand search for "Terminal" - Or use iTerm2 for enhanced features
Linux:
- Press
Ctrl + Alt + T(most distributions) - Or search for "Terminal" in your applications menu
Step 3: Connect to your server
In your terminal, type the following command:
ssh root@YOUR_IP_ADDRESS
Replace YOUR_IP_ADDRESS with your actual server IP. For example:
ssh root@185.123.45.67
Step 4: Accept the host key
The first time you connect, you will see a message like:
The authenticity of host '185.123.45.67' can't be established.
ECDSA key fingerprint is SHA256:...
Are you sure you want to continue connecting (yes/no)?
Type yes and press Enter. This adds the server to your list of known hosts.
Step 5: Enter your password
You will be prompted for the root password:
root@185.123.45.67's password:
Type your password (characters won't appear on screen for security) and press Enter.
Note: If you paste your password, be aware that most terminals don't show any indication that text was pasted. This is normal security behavior.
Step 6: Verify you're connected
After successful authentication, you should see:
Welcome to Ubuntu 22.04 LTS (GNU/Linux ...)
...
root@your-server-hostname:~#
The # or $ prompt indicates you're successfully logged in and can run commands.
Security best practices
Use SSH keys instead of passwords
Password authentication is convenient but less secure than SSH keys. After your initial connection, set up SSH key authentication:
- Generate an SSH key pair on your local machine
- Copy your public key to the server
- Disable password authentication (optional but recommended)
Change the default SSH port
Changing the default SSH port (22) can reduce automated attack attempts. Edit /etc/ssh/sshd_config and change the Port directive.
Disable root login
Create a new user with sudo privileges and disable direct root login:
adduser yourusername
usermod -aG sudo yourusername
Then edit /etc/ssh/sshd_config and set PermitRootLogin no.
Set up a firewall
Configure UFW (Uncomplicated Firewall) or iptables to allow only necessary ports:
ufw allow 22/tcp
ufw enable
Troubleshooting common issues
Connection refused
Problem: You see "Connection refused" when trying to connect.
Solutions:
- Verify your VPS is running in the control panel
- Check that the SSH service is running:
systemctl status ssh - Ensure your firewall allows connections on port 22
- Verify you're using the correct IP address
Permission denied
Problem: Authentication fails even with correct password.
Solutions:
- Double-check you're typing the password correctly (copy-paste can include spaces)
- Verify you're using the correct username (usually
root) - Check if your IP is blocked due to failed login attempts
- Try resetting your password from the control panel
Host key verification failed
Problem: You see a warning about host key verification.
Solutions:
- If you reinstalled your server, remove the old key:
ssh-keygen -R YOUR_IP_ADDRESS - Or manually edit
~/.ssh/known_hostsand remove the offending line
Slow connection
Problem: SSH connection is slow or times out.
Solutions:
- Check your internet connection speed
- Verify server resources aren't exhausted
- Try connecting from a different network to rule out ISP issues
- Check server logs for issues:
journalctl -u ssh
What's next?
Now that you're connected to your VPS, consider:
- Securing your server: Set up SSH keys, configure a firewall, and disable unnecessary services
- Creating a non-root user: Set up a user account with sudo privileges for daily use
- Installing essential software: Update your system and install tools you need
- Setting up monitoring: Configure alerts to monitor your server's health
Getting help
If you encounter issues not covered in this guide:
- Check our other knowledge base articles on server management
- Contact support through the RoyaleHosting control panel
- Join our Discord community for peer support
Remember: Never share your root password or SSH keys publicly. These credentials provide full access to your server.
Step-by-step instructions
Prerequisites
- Active VPS service
- Basic command line knowledge
Obtain your server credentials
After your VPS is provisioned, you will receive an email with your server IP address, root password, and SSH connection details. Save these credentials securely.
Open your terminal
On Windows, use PowerShell or Windows Terminal. On macOS and Linux, use Terminal. We will use the SSH command to connect.
Connect via SSH
Type the following command, replacing YOUR_IP_ADDRESS with your actual server IP: ssh root@YOUR_IP_ADDRESS. When prompted, enter your root password.
Verify connection
Once connected, you should see a command prompt showing your server hostname. You are now logged into your VPS and can run commands.
Frequently asked questions
You can reset your root password from the RoyaleHosting control panel. Navigate to your VPS service, click on "Server Management", and select "Reset Root Password".
Yes! SSH key authentication is more secure than passwords. You can add your public SSH key through the control panel under "Server Management" > "SSH Keys".
First, verify your server is running in the control panel. Check that your firewall allows SSH connections on port 22. If issues persist, contact support with your server IP and any error messages.
SSH (Secure Shell) is encrypted and secure. However, you should disable password authentication and use SSH keys for enhanced security, especially for production servers.