How to Connect to a Linux VPS Using SSH
Short answerAfter provisioning finishes, open a terminal and run ssh root@YOUR_SERVER_IP using the Primary IPv4 and credentials from your VPS service page. Verify the server fingerprint on first connect, then enter your password.
Overview
SSH (Secure Shell) is the standard method for remotely managing Linux servers. Whether you're deploying a website, configuring software, or performing routine maintenance, SSH provides an encrypted connection that allows you to securely administer your VPS from almost anywhere.
If you've just received your VPS credentials from VPSGrid, this guide walks you through connecting for the first time using Windows, macOS, or Linux.
Before You Begin
Before attempting to connect, confirm that:
- Your VPS provisioning has completed successfully.
- Your service status is Active.
- You know your Primary IPv4 Address.
- You have your initial username and password.
- Your local internet connection is working.
- Port 22 has not been blocked by your local firewall or network.
What Is SSH?
SSH (Secure Shell) is an encrypted network protocol used to securely access and manage Linux servers over the internet.
Unlike older protocols such as Telnet, SSH encrypts all communication between your computer and the server, helping protect passwords and sensitive administrative tasks.
Most Linux server administration is performed through SSH.
Information You'll Need
Before connecting, gather the following information from your VPS service page:
- Primary IPv4 Address
- Username (commonly
rootfor the initial login) - Initial password
- Service status
If you're unsure where to find these details, see Understanding Your VPS Details.
Connecting from Windows
Modern versions of Windows include OpenSSH by default.
Using Windows Terminal or PowerShell
- Open Windows Terminal or PowerShell.
- Enter the following command:
ssh root@YOUR_SERVER_IPReplace YOUR_SERVER_IP with your VPS's Primary IPv4 Address.
Press Enter.
If this is your first connection, you'll see a message asking you to verify the server's fingerprint.
Type:
yesThen press Enter.
Enter your password when prompted. For security reasons, the password will not be displayed as you type.
Using PuTTY
If you prefer PuTTY:
- Open PuTTY.
- Enter your VPS IP address in the Host Name field.
- Ensure the port is 22.
- Confirm the connection type is SSH.
- Click Open.
- Accept the server fingerprint if prompted.
- Log in using your username and password.
Connecting from macOS
macOS includes Terminal with SSH support built in.
- Open Terminal.
- Run:
ssh root@YOUR_SERVER_IP- Accept the server fingerprint if prompted.
- Enter your password.
You're now connected to your VPS.
Connecting from Linux
Most Linux distributions include the OpenSSH client by default.
Open a terminal and run:
ssh root@YOUR_SERVER_IPVerify the server fingerprint during the first connection and enter your password when prompted.
Understanding the SSH Fingerprint
The first time you connect to a new server, SSH displays a fingerprint.
This fingerprint allows you to verify that you're connecting to the correct server.
Once accepted, it is stored on your computer so future connections can verify the server automatically.
If the fingerprint changes unexpectedly in the future, investigate before reconnecting, as this could indicate that the server has changed or that the connection requires verification.
What Happens After Login?
Once connected, you'll see a command prompt on your Linux VPS.
From there you can:
- Update the operating system.
- Install software packages.
- Configure web servers.
- Create users.
- Configure SSH keys.
- Deploy applications.
- Manage services.
Your VPS is now ready for administration.
Recommended First Steps
After your initial login:
- Change the initial password if appropriate.
- Install available operating system updates.
- Configure a firewall.
- Create an administrative user for routine work if it fits your workflow.
- Review SSH security settings.
- Consider configuring SSH key authentication for improved security.
These steps help establish a more secure server before deploying production applications.
Common SSH Errors
Connection Timed Out
Possible causes include:
- Incorrect IP address.
- Local firewall restrictions.
- Temporary network issues.
- VPS still provisioning.
Verify the service is active and confirm you're using the correct IP address.
Permission Denied
This usually indicates:
- Incorrect username.
- Incorrect password.
- Authentication configuration issues.
Double-check the credentials shown in the Client Area.
Host Key Verification Failed
This message appears when the stored SSH fingerprint doesn't match the server you're connecting to.
Common reasons include:
- The VPS was reprovisioned.
- The operating system was reinstalled.
- The server identity changed.
Verify the reason before removing or updating stored host keys.
Connection Refused
This generally means the SSH service isn't accepting connections.
Possible causes include:
- SSH service not running.
- Firewall configuration.
- Network configuration issues.
If the issue persists after verifying your VPS is active, contact VPSGrid Support for platform-related assistance.
Security Best Practices
For better long-term security:
- Use SSH keys whenever practical.
- Keep the operating system updated.
- Disable unnecessary services.
- Use strong, unique passwords.
- Restrict administrative access.
- Monitor authentication logs regularly.
Good security habits established early help protect your VPS over time.
Frequently Asked Questions
Which username should I use?
For the initial connection, the administrative account is commonly root on Linux VPS deployments. Always verify the username displayed in your VPS service details.
Which port does SSH use?
SSH typically uses TCP port 22 unless you intentionally change the server configuration after deployment.
Can I connect using a domain name instead of an IP address?
Yes, once your domain's DNS records point to your VPS and DNS propagation has completed, you can connect using the configured hostname or domain if your SSH configuration supports it.
Is SSH secure?
Yes. SSH encrypts traffic between your computer and the server, making it the standard method for administering Linux systems remotely.
Should I continue using the root account?
For many production environments, administrators create separate privileged users and use the root account only when necessary. The appropriate approach depends on your security requirements and administrative practices.
VPSGrid Notes
Your Linux VPS credentials, including the Primary IPv4 Address and initial administrative account, are available in the VPSGrid Client Area after provisioning completes.
If your VPS is still provisioning, wait until the service is fully ready before attempting to establish an SSH session.
Summary
SSH is the primary method for securely administering a Linux VPS. By understanding how to connect from Windows, macOS, and Linux, verifying the server fingerprint, and following basic security practices, you'll be ready to manage your server confidently.
Once you've successfully logged in, the next step is to secure your VPS and begin installing the software required for your project.
Related Articles
Need More Help?
Search this knowledgebase for related guides. If the issue persists, open a ticket at billing.vpsgrid.net with your service ID, primary IP, and steps already tried. See What Information to Include in a Support Request and Security Responsibilities on Unmanaged VPS for scope and required details.
Was this answer helpful?