This guide will take you through the first steps of creating and connecting to a Public Cloud instance.
Free trial: Create your first Public Cloud project and get $200 free credit[1]. Get started now!. |
Considering best practices, OVHcloud Public Cloud instances require a different approach than a VPS or Dedicated server solution.
Requirements
- A Public Cloud project in your OVHcloud account
- Access to the OVHcloud Control Panel
Instructions
Step 1: Creating SSH keys
The SSH protocol ensures encrypted client-server communication. Using SSH keys further improves security by preventing any connections from a device that does not possess the matching key. Creating an SSH key set provides you with a public and a private key.
-
The public key will be added to your Public Cloud instance at installation.
-
The private key, stored on your client device, will then enable access to your instance without requiring the user password.
Login authentication on Windows instances requires only a username and password.
Creating an SSH key using a Linux or Mac operating system
From a Mac computer or a device with a Linux OS installed, first open the command line application (Terminal). Verify that you have a ".ssh" folder in your $HOME directory. If the folder does not exist, create it:
$ mkdir ~/.ssh $ chmod 700 ~/.ssh
Use the following command to create a 4096 bit RSA key:
$ ssh-keygen -b 4096
Using the "-t" option with this command allows you to specify a different encryption method, for example:
$ ssh-keygen -t ecdsa -a 256
The command will prompt you to save the newly created key in the standard file:
Generating public/private rsa key pair. Enter file in which to save the key (/home/user/.ssh/id_rsa):
You can accept the default file by pressing "Enter". Now you will have the option to enter a passphrase to protect your SSH key. This is recommended for added security. Since only the corresponding private key will be required to access your Public Cloud instance from your working device, appropriate security measures should be applied at this point. The passphrase has to be entered when a connection to the instance is established.
Your SSH keys should be stored in the ".ssh" directory. The public key file will have ".pub" added to the filename.
Your identification has been saved in /home/user/.ssh/id_rsa. Your public key has been saved in /home/user/.ssh/id_rsa.pub. The key fingerprint is: SHA256:MRk+Y0zCOoOkferhkTvMpcMsYspj212lK7sEauNap user@hostname The key's randomart image is: +---[RSA 4096]----+ | .. o | | . .= o | | o o X | |. . . . | |. .=.o .S. | | =o.o. . . | |o + . . o .. | |.. . . oEoo . | |o. .o+oo | +----[SHA256]-----+
In order to view and export your public key, use the "cat" command on your ".pub" key file and copy the output:
$ cat ~/.ssh/id_rsa.pub ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8teh2NJ42qYZV98gTNhumO1b6rMYIkAfRVazl k6dSS3xf2MXJ4YHsDacdjtJ+evXCFBy/IWgdkFtcvsGAMZ2N1RdvhDyQYcy6NDaJCBYw1K6Gv5fJ SHCiFXvMF0MRRUSMneYlidxUJg9eDvdygny4xOdC6c1JrPrSgOc2nQuKeMpOoOWLINIswg1IIFVk kFMPrFivP8Z6tidzVpAtbr1sXmJGZazYWrU3FoK2a1sF1zEWrmlMOzX81zEWrmlMOzX8CpZW8Rae i4ANmLy7NULWK36yU0Rp9bFJ4o0/4PTkZiDCsK0QyHhAJXdLN7ZHpfJtHIPCnexmwIMLfIhCWhO5 user@hostname
$ pbcopy < ~/.ssh/id_rsa.pub
Creating an SSH key using a Windows operating system
PuTTY is an open-source SSH client software with a graphical user interface, available for Windows and other operating systems. You can use it to remotely connect to a Linux server. Its companion software, PuTTY Key Generator (PuTTYgen), can be used to create SSH keys.
First, download PuTTY from the official website, if it is not already installed. The recommended standard installation package includes PuTTYgen but it is available as a standalone file there as well. To find out if you have it available already, check your "programs" menu or use the Windows Search.
Open PuTTYgen and select a supported encryption algorithm. The example uses RSA. Enter 4096 as the number of bits, then click the Generate
button.
Next, randomly move your mouse cursor about the area below the progress bar:
The key is ready when the progress bar is full.
You can select and copy the public key from this window to save it in your OVHcloud Control Panel in Step 2.
Save both keys to files and use the option to enter a passphrase. Since only the corresponding private key will be required to access your Public Cloud instance from your working device, appropriate security measures should be applied at this point. The passphrase has to be entered when a connection to the instance is established.
Step 2: Storing public keys in the OVHcloud Control Panel
Regardless of the method that was used to create the SSH keys, you will now have a public key ready to be added to a Public Cloud instance. You can store public keys in the Public Cloud section of the OVHcloud Control Panel, in order to have them readily available when creating an instance.
Log in to the OVHcloud Control Panel, go to the Public Cloud
section, and select the Public Cloud project concerned. Then, click on SSH Keys
in the left-hand navigation bar under Project Management. Click on the Add an SSH key
button.
In the new window, enter a name for the key and paste your key string (copied in Step 1 from the public key file or the PuTTYgen window) into the "Key" field. Confirm by clicking Add
.
Step 3: Creating an instance
Log in to the OVHcloud Control Panel, go to the Public Cloud
section, and select the Public Cloud project concerned. On the Home page, click on Create an instance
. (You can find the same functionality on the "Instances" page by clicking Instances
in the left-hand navigation bar under Compute.)
First, choose a server template according to your needs. The assistant will provide descriptions of the various use cases and server model availability.
You can choose from these customized categories:
Server Type | Guaranteed Resources | Usage Notes |
---|---|---|
General Purpose | ✓ | Development servers, web, or business applications |
CPU | ✓ | Video encoding or other high-performance computing |
RAM | ✓ | Databases, analysis, and in-memory calculations |
GPU | ✓ | Massive parallel processing power for specialized applications (rendering, big data, deep learning, etc.) |
Sandbox (deprecated) | - | Hosted on shared resources for testing and development environments |
Discovery | - | Hosted on shared resources for testing and development environments |
Quota and Regions
in the left-hand navigation bar under Project Management. Note that you can upgrade your instance later but you will not be able to switch to a smaller model unless you choose the "Flex" option in the fourth step of the creation. Please see below for more details on this.In the next step, choose a datacenter for your Public Cloud instance.
The third step is to select an operating system for the instance. Which images are available in this step depends on the choices made in previous steps, i.e. compatibility with the server type and the region. Operating systems with pre-installed applications are also available.
This step also requires an SSH key to be added (Windows instances excluded), either by pasting the key directly via Add a key
or selecting it from the list, provided you have stored it in the Control Panel in Step 2.
The fourth step allows you to configure some additional options.
- You can deploy multiple instances with the chosen setup (within your initial quota mentioned above).
- You can choose to create a flexible instance that allows you to later downgrade to a smaller model (even switching server model categories) but it will limit the instance to 50GB of included storage at all times, regardless of upgrades or downgrades.
- You can change the display name for your instance.
- You can add a post-installation script.
- You can choose to attach a private network to your instance by selecting one from the dropdown menu or, to create a new one, click on
Create a private network
.
The Private mode provides you with the possibility of assigning your instances to a private network only. Instances in this mode can only be exposed to the public network using a Gateway or a Load Balancer service with Floating IPs. For more information, please consult our Public Cloud Networking guides.
When you have applied your choices, click Next
to proceed to the final step and decide on a billing method.
We recommend choosing hourly billing if there is any doubt regarding the usage period because it is not possible to choose it after the service delivery. You will have the option to switch to a monthly subscription as soon as the instance is available on the "Instances" page.
Once you have made sure that your configuration choices are correct, click on the Create an instance
button to finish creating your new instance. It may take a few minutes until your service is delivered.
Step 4: Connecting to your instance
Log in to the OVHcloud Control Panel, go to the Public Cloud
section, and select the Public Cloud project concerned. Then, click on Instances
in the left-hand navigation bar under Compute. Your instance is ready when the Status column in the table is set to "Activated". To verify, you can click on the "Refresh" button next to the search bar.
A user with elevated permissions is automatically created on the instance. The username reflects the chosen image, i.e. "ubuntu", "debian", "fedora", "arch", etc. You can verify this, as well as all other specifications on the instance's "Dashboard" by clicking on the more options ...
button and then on Instance details
.
Connecting to a Linux OS instance from Linux OS / Mac
You can now access your instance through a command line interface (Terminal) via SSH. Replace "username" in the following examples with your default user as explained above. You can also simply copy the complete login command from the OVHcloud Control Panel by clicking on it in the instance's "Dashboard" and then paste it into your Terminal.
Type the passphrase for your private key when prompted.
ssh username@IPv4_of_your_instance Enter passphrase for key '/Users/username/.ssh/id_rsa':
Since you are logged in with root privileges ("sudo user"), you can immediately enter commands to perform administrative tasks. It is advisable to first change your password:
$ sudo passwd username New password: Retype new password: passwd: password updated successfully
You can now use these credentials to log in via the VNC console
in your OVHcloud Control Panel. Next, switch to the "root" user and set a secure password, then switch back to the previous user:
$ sudo su - # passwd New password: Retype new password: passwd: password updated successfully # su - username
Note that switching to the "root" user is rarely necessary; as a best practice for administration tasks that require root privileges, log in and execute commands as a user who is included in the "sudo" group.
Connecting to a Linux OS instance from Windows
After creating and saving your SSH keys (in Step 1) and installing your instance with the public key (in Step 3), you can use PuTTY and your private key to connect to your instance.
Open PuTTY and expand SSH in the left-hand menu, then click on Auth
to see the authentication options. Click the Browse
button to navigate to the folder where your private key file (.ppk) is located and open it.
Next, switch to Session via the left-hand menu and enter your login credentials (username@IPv4_address). Replace "ubuntu" in the example screenshots with your appropriate default user according to the instance's "Dashboard" in your OVHcloud Control Panel. (Click on Instances
in the left-hand navigation bar, then click on the instance's name.)
For future connections, you can now save this session to have it available from the list in this interface. Enter a descriptive name under "Saved Sessions" and click on Save
to add it.
Next, click on Open
and you will be prompted to enter the key's passphrase.
Connecting to a Windows OS instance
After the instance has been created, the Windows installation needs to be finalized (sysprep). To achieve this, click on ...
and then on Instance details
. Switch to the tab VNC console
. The console should already display the post-installation interface.
In the first step, decide on your localization settings by selecting a region, a language, and a keyboard layout. Click on Next
to proceed.
The second step requires to set up the default "Administrator" account. Enter your passphrase twice and click on Finish
to complete the installation process. Use the eye symbol to check if all the characters entered into the fields match the actual layout of your keyboard.
The instance will reboot and you will be able to log in with these credentials using a remote desktop client.
From Windows
Use the Windows Search if necessary and open the native "Remote Desktop Connection" client application.
Enter the IPv4 address of your instance and "Administrator" as the user, then type your passphrase. Usually, a warning message will appear, asking to confirm the connection because of an unknown certificate. Click Yes
to log in to the instance.
From a Linux OS
Public Cloud instances can be accessed via the built-in VNC console in the OVHcloud Control Panel. From your local device, connections must be established by a client application that is capable of the Remote Desktop Protocol (RDP).
For example, Remmina Remote Desktop Client is a compatible application that should be included in an Ubuntu Desktop installation. If you do not find Remmina in your environment, you can obtain it from the official website.
Open Remmina and make sure the connection protocol is set to "RDP". Enter the IPv4 address of your Public Cloud instance and press "Enter".
If a certificate message appears, click on Yes
. Next, enter the username and password for the instance and click on OK
to establish the connection.
Go further
For more information and tutorials, please see our other Public Cloud support guides or explore the guides for other OVHcloud products and services.
[1]: Receive $200.00 (USD) in additional Public Cloud credits (the "Additional Credits") when you create your first Public Cloud infrastructure project. Offer applies only to Public Cloud services purchased from OVHcloud datacenters in the United States. Offer available only to select customers who, at the time when the Additional Credits are applied, are not purchasing Public Cloud services from OVHcloud and who purchase at least $0.99 (USD) Public Cloud services from OVHcloud. No code is required. The Additional Credits will be added to eligible accounts within 30 days of OVHcloud's receipt of the $0.99 for your purchase of Public Cloud credits. The Additional Credits are valid until December 31, 2023, at 23:59:59 ET. The Additional Credits will automatically be applied to your next bill(s) up to a maximum amount of $200.00. Any unused portion of the Additional Credits will expire. The Additional Credits have no monetary value, and cannot be exchanged, transferred, or refunded. Once the Additional Credits are exhausted or expired, your account will be debited in accordance with OVHcloud’s billing guide.