Connecting to Your Linux VPS using SSH
Best wishes on your new Linux VPS! We are delighted to be your cloud provider. Now, it's time to realize the full potential of your strong server now that you have one at your disposal. The secure industry standard for remote server access, SSH (Secure Shell), will be used to connect to your virtual private server (VPS). This tutorial will bring you through the process.
Why Use SSH?
SSH offers an encrypted, safe method for Linux VPS management. SSH adds an additional layer of security to your server by using private and public key pairs to authenticate you, as opposed to password authentication.
Downloading Your SSH Keys
Log in to your Vilcom Client Area then navigate to Services.
01.png
Select your specific Linux VPS service
02.png
On the service management page, locate the "Service Management" section.
03.png
Extra VMN instance details such as Status, IP address, Current OS base image, RAM, Disk, vCPUs is shown. You will see two buttons: "Download Private Key" and "Download Public Key".
04.png
Private Key: This is the essential key that grants you access to your VPS. Keep this file secure! Never share your private key with anyone.
05.png
You can also download the Public Key(optional). This key can be added to other devices you use to connect to your VPS. Since password login is disabled, having the public key on other devices allows for easier access.
06.png
Setting Up Your SSH Client
1. Connecting from Linux/macOS
Open your terminal application (Terminal on macOS, default terminal app on Linux).
Linux / macOS user can set permissions like below for the private key.
chmod 0600 /path/to/private/key
# Example
chmod 0600 ~/Downloads/44_private.rsa
Once the permissions are set correctly, use the following command syntax to connect to your VPS, replacing your_username with "root" (the default username for CloudSpinx Linux VPS templates) and your_server_ip with your actual VPS IP address (found in the service management section):
ssh -i path/to/your/private_key_file root@your_server_ip
Here is an example on how to SSH to 192.168.20.22 IP address as root user. The path to private key in this example is ~/Downloads/44_private.rsa
$ ssh -i ~/Downloads/44_private.rsa root@192.168.20.22
Warning: Permanently added '192.168.20.22' (ED25519) to the list of known hosts.
Welcome to Ubuntu 24.04 LTS (GNU/Linux 6.8.0-35-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro
System information as of Fri Jun 21 15:41:54 UTC 2024
System load: 0.0 Processes: 97
Usage of /: 8.8% of 18.33GB Users logged in: 0
Memory usage: 8% IPv4 address for ens3: 192.168.20.22
Swap usage: 0%
Expanded Security Maintenance for Applications is not enabled.
2 updates can be applied immediately.
To see these additional updates run: apt list --upgradable
Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status
Last login: Fri Jun 21 15:19:17 2024 from 197.248.156.95
root@446675971ed21f6:~#
2. Connecting from Windows
Download and save private key to a directory in your windows machine.
07.png
Download and Install PuTTygen tool.
08.png
Choose an installer suitable for your machine CPU.
09.png
Begin installation by double-clicking .exe file downloaded and follow the prompts.
10.png
Search for "PuTTYgen" and open it.
11.png
Go to "Conversions" then "Import Key".
12.png
Open the private key file that you downloaded earlier.
13.png
Tick "RSA" under Type and "Save Private Key". You can optionally add Keyphrase to secure the key.
14.png
Agree to Save the key in your local machine.
15.png
Give it a name and save converted file.
16.png
Search for "PuTTY" installed package.
17.png
Select key file you saved after conversion.
18.png
Go to "Session" --> Input Host IP address (The IP address is available in your client dashboard).
19.png
Enter "root" (the default username) when prompted and press Enter.
20.png
After inputting the username, press enter and you will get to VM OS ssh console.
21.png
Congratulations! You have successfully and securely connected to your Linux VPS via SSH.