Learn how to securely log on to your server with the SSH protocol.
The SSH (Secure Shell) communication protocol is the main practice for establishing encrypted host connections through untrusted networks. The OpenSSH utility is available 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)
This guide does not apply to standard Windows server installations since they rely on the Remote Desktop Protocol for connections. However, SSH connections are used for the OVHcloud rescue mode. You can find more information in the Go further section of this guide.
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 key-based authentication to enable secure logins without passwords. You can find more details in our guides:
- How to create and use keys for SSH authentication
- How to create and use keys for SSH authentication with PuTTY
The login credentials (username and password) are sent to you by email at the first installation or when a server is reinstalled in the OVHcloud Control Panel.
The username corresponds to the operating system, for example, ubuntu
or debian
. To connect, you also need to specify the IP 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
Establishing a connection
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 you have changed the SSH port of the server, use this command instead:
Recent versions of the Windows OS include OpenSSH, so you can use it directly from the native command line applications (PowerShell or Command Prompt).
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 you have changed the SSH port of the server, 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.
Example output:
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.
Example output:
It means that one of 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.
The warning message does not necessarily indicate a security issue. If you have not initiated one of these incidents, the remote server might be compromised.
To resolve this issue, follow the steps in the appropriate tab below.
Use the following command with the IP address of your server.
Alternatively, you can edit the known_hosts
file located in your local user account's home
folder with a text editor.
Example:
To resolve this, use the following command with the name of your local Windows user account and the IP address of your server:
Alternatively, navigate to this folder, right-click on the file, and open it with a text editor (Notepad, Notepad++, etc.).
Locate the "offending" line that was specified in the warning message; in this example, it would be the third one. Highlight and delete the entire line.
Save the changes and exit the editor. You will have to confirm the new fingerprint at the next server login.
Using dedicated GUI clients or software compatible with SSH
If you prefer a graphical user interface, you can find many software applications for every type of OS that enable you to connect to remote hosts via the SSH protocol.
For example, PuTTY is an open-source SSH client software with many user features. Find out how to use it for connections to OVHcloud servers in our detailed tutorial:
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
How to create and use keys for SSH authentication
How to create and use keys for SSH authentication with PuTTY
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.