Whether you’ve already got your Virtual Private Server up and running, or you’re still weighing up your options, knowing how to connect to a VPS is knowledge worth having. In this blog post, we’re going to run through two methods of how you can connect to a VPS, and the one you opt for will depend on your chosen operating system (OS).
But first, let’s run through some key concepts you’ll need to know before connecting to your VPS.
What is Remote Desktop Protocol?
RDP, or Remote Desktop Protocol, allows you to remotely access a desktop computer. As a remote user, you can open and edit any files from your desktop even when you’re not in the proximity of your computer. RDP was originally configured by Microsoft, and can be accessed via the Remote Desktop Connection function on any Windows OS.
With this logic, an RDP can be used to access a VPS in a similar way to accessing a physical computer elsewhere.
What is Secure Shell (SSH)?
A Secure Shell (SSH) is a communication protocol that enables two computers to share data over an unsecured network. Using an SSH will provide strong password and public key authentication to help with communication via a public network. A Secure Shell is usually used by Linux machines to remotely manage networks, to allow a remote login, but it can be utilised by other OS like Windows too.
Users can then access, transfer and edit their files with an SSH, which allows for an encrypted connection. This connection is especially useful when handling sensitive data or specific commands that could harm a VPS or other type of server.
What do I need to connect to a VPS?
On a Windows device, use the Remote Desktop Connection client application. Input the IPv4 address of your VPS along with your username and password. You may see a warning message about an unknown certificate. Simply click Yes to proceed with the login.
To connect to a Linux VPS from a Window’s device, you’ll need an SSH client, such as OpenSSH, along with the VPS's IP address. You'll also need a username, which is usually "root" or another designated user, and the appropriate password or SSH private key for authentication. On most systems, you can start the connection using a terminal or command prompt with a command formatted as ssh username@vps_ip_address. Make sure that port 22, the default for SSH, is open on your VPS and that your firewall permits the connection.
How to connect to a Virtual Private Server
Now that we’ve established what RDP and SSH are, as well as the prerequisites to connect to either a Windows or Linux VPS, we can apply this knowledge when connecting to a VPS. Read on to find out how to connect to a Windows or Linux VPS.
How to connect to a Windows VPS
The first method of connecting to a VPS applies if you’ve chosen a Windows VPS. If you’re using a VPS with Windows, you can connect to it easily via the Remote Desktop tool. This will already be installed on your Windows OS, and you’ll just need administrator access.
1. Find the Remote Desktop Connection application
Click the start button on your computer and search for ‘Remote Desktop Connection’. Select the Remote Desktop application when it appears to open it up.
2. Enter your VPS IP
Next you’ll need to enter your VPS IP address into the pop up box provided – it should look like the image above. You should have received the IP address for your virtual private server after it was provisioned. If not, make sure to get in touch.
3. Gain administrative access
Now you’ll be asked for a username and password, which will also have been provided to you after your server was provisioned. This Administrator or root password will be what you use to RDP to your server.
4. Connect to your VPS
Click connect, and now you’re an Admin to your Windows VPS. Easy, right?
How to connect to a Linux VPS
The second method we’re going to look at applies if you’ve got a Linux VPS. Connecting to a virtual private server running Linux can be more complex. From a root account you can connect to your Linux VPS via a terminal. If you don’t already have a terminal, we recommend downloading PuTTY or a similar application to ensure that you can form an SSH connection.
1. Run a terminal application
Run your chosen terminal application, and then enter your VPS connection settings. We’ve used PuTTY as an example below:
2. Enter your IP address
As you’ll see, the application is asking for your IP address. If you don’t know your VPS IP, or have lost the documents which detail the address, get in touch with us to finish connecting to your VPS.
At this moment in time, no changes are needed to the port and the value can be left at ‘22’. When setting up your VPS, you may want to alter this value to increase the security of your VPS. You should also keep the connection type as SSH as this will come in handy when configuring your VPS.
Finally, go ahead and press open to begin the SSH session.
3. Establish an SSH connection
As this may be the first time you’ve connected to your VPS from this device, a pop up will appear. Click ‘Accept’ to proceed with the VPS connection. The SSH connection will now begin.
4. Enter your credentials
Now the terminal will appear, and all you have to do is enter your username and password. As you’re accessing from a root account, your username will simply be ‘root’. The password to be entered is the one that has been provided to you post-server provisioning.
Lastly, if the password has been entered successfully, you’ll now be logged in as a Root account and connected to your Linux VPS.
Frequently asked questions about how to connect to a VPS
Can I use SSH for both Windows and Linux VPS?
Yes, you can use an SSH for both Windows and Linux VPS. However, you’ll need to install an SSH server separately for your Windows VPS.
What if I don’t know how to log into my VPS?
You should have your login details sent to you via email from your provider. If this has been lost, you can contact your web hosting provider to get this reset.
How can I connect to a Linux VPS on a Mac?
To access your VPS on macOS, launch the Terminal application. Enter the ssh command in the format ssh username@vps_ip_address, substituting "username" with your VPS username (for example, "root") and "vps_ip_address" with your VPS's actual IP address. If you are using an SSH key for authentication, include it with the -i option, like this:
ssh -i /path/to/your/private_key username@vps_ip_address
On your first connection, you will need to verify the VPS' fingerprint, after which you will either be asked for your password or be authenticated automatically using your key.
If you’re looking to start off your VPS journey, there’s no better provider than Fasthosts. Why not talk to our sales team today to see which of our servers is perfect for you. Want to learn more about Virtual Private Servers? Two great places to start are our blog posts ‘what is a VPS?’ and ‘what to do with a VPS?’