*Cube-Host– full cloud services!!

Knowledge Base

2.1.6. Connect to a Linux VPS from Windows via SSH using an SSH key

Step 1: Generating an SSH key in Windows

Before you can connect to the server, you need to create an SSH key.

1.1 Open PowerShell

Press Win + R, type: powershell

Click OK.

1.2 Create an SSH key

In the PowerShell that opens, run the command: ssh-keygen -t ed25519

When prompted:

  • Press Enter, to save the key to the default path.
  • If the message appears:
  • Overwrite (y/n)?
  • enter y to overwrite an existing key, or n to cancel the operation.
  • When prompted: Enter passphrase
  • you can:
    • press Enter to leave it without a passphrase;
    • or specify an additional passphrase.

Upon completion, two files will be created:

  • id_ed25519 – private key (not shared with third parties)
  • id_ed25519.pub – public key (used to add it to the panel).

1.3 Viewing the public key

To display the public key, run the command: type $env:USERPROFILE.sshid_ed25519.pub

The following string will be displayed: ssh-ed25519 AAAA….

Copy this string in its entirety – this is your public SSH key.

Step 2: Add SSH key to VPS

2.1 Open the VPS management

Authorize in the Cube-Host client panel.

Under Your Active Products/Services, click View Details against your VPS.

2.2 Go to Cloud Panel

On the service management page, click Login to cloud panel.

2.3 Select a project

Open Default project.

2.4 Select a server

Click on the desired server (for example, servername.com).

2.5 Click the Reinstall tab

Open the Reinstall tab .

2.6 Add a public SSH key

In the SSH Keys section, click Add Public SSH Key.

In the window that opens:

  1. Paste the copied public key into the Public SSH Key field .
  2. Specify a name for the key (for example, the device name).
  3. Click Add Public SSH Key.

IMPORTANT: The SSH Key is added when the server is reinstalled. If the server is already deployed, you must Reinstall to apply the key.

Step 3: Connect to the server via SSH

3.1 Find out the IP address of the server

The IP address is displayed in the Cloud Panel next to the server.

3.2 Make the connection

In PowerShell, run the command: ssh root@IP_ADDRESS

Example: ssh root@192.0.2.10

If you want to explicitly specify a key: ssh -i $env:USERPROFILE.sshid_ed25519 root@IP_ADRES

3.3 First Connection

When connecting for the first time, the system may prompt you:

Are you sure you want to continue connecting (yes/no)?

Enter: yes

After successful authorization, you will have access to the server command line.

Menu