Learn how to securely access your server with SSH.
The SSH (Secure Shell) communication protocol is the main practice for establishing encrypted host connections through untrusted networks. The OpenSSH tool is natively installed on all OVHcloud servers (VPS, dedicated servers, Public Cloud instances) to allow secure remote server logins and other operations.
This tutorial is designed to help you as much as possible with common tasks. If you are having difficulty performing these actions, please contact a specialized service provider. OVHcloud can't provide you with technical support in this regard.
Requirements
- a dedicated server or a VPS in your OVHcloud account
- an SSH client application (command line or GUI)
Instructions
There are multiple ways to authenticate a connection to a remote device via SSH. The following instructions will involve the authentication method with username and password. You can also configure SSH keys to enable secure logins without passwords. Find the details in our SSH key guide.
The login credentials (username and password) are sent to you by email after a server installation or reinstallation from the OVHcloud Control Panel.
The username corresponds to the operating system, for example, ubuntu
or debian
. To connect, you also need to specify the IPv4 address or the hostname of the server. These details are available in the installation email and the OVHcloud Control Panel.
Be sure to consult our "Getting Started" guides as well:
- For a dedicated server
- For a dedicated server of the Eco product line
- For a VPS
Connecting from a GNU/Linux distribution or macOS
A command line client for SSH (OpenSSH) is usually available by default. Open the Terminal application and connect to the server with the following command:
If the SSH port of the server is not the standard one, use this command instead:
The latest versions of Windows natively include OpenSSH for connections from the PowerShell or the Command Prompt application.
Right-click on the Windows start button and select Windows PowerShell
. Alternatively, use the search field to start one of these programs.
Connect to the server with the following command:
If the SSH port of the server is not the standard one, use this command:
Login and fingerprint
When prompted for a password, type the password of the connecting user and press Enter
.
If this is a new connection, your SSH client will receive a key fingerprint from the server. Enter "yes" to confirm and then the password of the connecting user to log in.
The fingerprint is then saved on your device and will be verified for each new connection. If the key has changed on the remote host, you will receive a warning message when trying to connect, for example:
It means that one the following has occurred:
- The server has been reinstalled.
- The SSH service on the server has been reinstalled.
- You are connecting to a different host with the same IP address.
Alternatively, open the known_hosts
file located in your home folder with a text editor and delete the "offending" line that was specified in the warning message:
Save the changes and exit the editor. You will have to confirm the new fingerprint at the next server login.
On Windows, the location of the known_hosts
file and the line you have to delete are specified as well, for example:
To resolve this, use the following command with the IP address of your server:
Alternatively, navigate to this folder, right-click on the file and open it with the Notepad application.
Delete the pertinent line, in this example it would be the third one. Save the changes and exit the editor. You will have to confirm the new fingerprint at the next server login.
Using GUI clients or SSH-compatible software
Many software applications enable you to connect to your server(s) via SSH.
For example, PuTTY for Windows is an open source SSH client software with a graphical user interface. It has been ported to other platforms as well and is available from the official website, software package managers, and Homebrew.
Start PuTTY and enter the IP address of the server. Specify the port number if the standard port is not used. Then click on Open
to connect. You will be prompted for username and password.
One advantage of PuTTY is the ability to save multiple sessions. Enter the connection details into the Saved Sessions
field and click on Save
.
As usual, the fingerprint warning appears at the first connection. Click Accept
to save the fingerprint or select Connect Once
.
Please consult PuTTy's the official FAQ and documentation for more information.
Click here to see a list of software options for each of the three major operating systems.
On Windows:
For the latest Windows 10 and Windows Server versions, developer mode gives you access to a BASH (Bourne Again SHell) console. For more information, please review Microsoft's documentation.
On MacOS:
- The Terminal tool is delivered with macOS and is automatically installed on the machine.
On Linux:
Go further
Related articles:
For more information and tutorials, please see our other Dedicated Servers support guides or explore the guides for other OVHcloud products and services.
If you need training or technical assistance to implement our solutions, contact your sales representative or click on this link to get a quote and ask our Professional Services experts for a custom analysis of your project.