Get ovh rescue mode to work with an ssh key when no ssh key was chosen during installation

Edited by Cave Man, Alma, Eng, Dougie-1 and 3 others

I have run into this three times now, and very experienced admin people are completely baffled by ovh's lack of clear instruction. The problem is that after you launch your server in rescue mode you get an email that says:

Was this helpful? Yes | No

Dear Customer,

Your server has been started in 'Rescue' mode. This has either been requested by you in the OVH manager or a technician has had to do this because of an error that needs to be resolved in Rescue mode.

Was this helpful? Yes | No

This mode means that a basic Linux/BSD system has been launched on your server through the network. This is not the system installed on your server and none of your disks have been mounted.

A web interface is available for you to carry out diagnosis on your server (hard disk, raid, ram, CPU) and to browse your file systems using the following details: - http://x.x.x.x:81 - user: root - password: bXh6Qd08

Was this helpful? Yes | No

You may connect to your server through SSH with the following details: - IP: x.x.x.x - user: root Authentication Method: SSH key (chosen during installation) ...

The problem is that many people don't have an SSH key. I mistakenly thought it was the root password from when the server was first created. I dug through all my emails and found it and it didn't work. I tried every password known to man it didn't work. But FEAR NOT I have a solution.

Was this helpful? Yes | No
Ad

OVH Key Management

OVH, provides an interface in their control panel to allow you to manage ssh keys. Most people don't realize that if you have multiple ssh key pairs, the default (marked by a colored star) is critical in case of a boot failure and the server has to be put into rescue mode. When rescue mode is enabled, ONLY the default ssh key is loaded onto the server. So if the ssh key you try to login to the server with is not default you cannot login. This wiki will explain how to correct this situation and get you into your OVH server.

Was this helpful? Yes | No

Instructions

  1. 1
    Download and install putty ssh client and puttygen if you don't already have it on your computer from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
    Advertisement
    Was this step helpful? Yes | No
  2. 2
    This wiki assumes you follow all the steps to create a public key as per the wiki I linked to here.
    Advertisement
    Was this step helpful? Yes | No
  3. 3
    Go to your OVH control panel.
    Was this step helpful? Yes | No
  4. 4
    Go to key management.
    Was this step helpful? Yes | No
  5. 5
    Cut and paste the public key you generated from putty
    .
    Img-2013-apr-24-033 2.jpg
    Was this step helpful? Yes | No
  6. 6
    Set this new key as default by clicking on the star next to your keyname
    .
    In my example the key was called "Doug". Only the default ssh key is injected into your server in rescue mode so make sure you choose this new key as default in the case where you already had ssh keys defined as I did.
    Was this step helpful? Yes | No
  7. 7
    Reboot your server from the OVH control panel
    .
    Img-2013-apr-24-033 3.jpg
    Was this step helpful? Yes | No
  8. 8
    Now connect to the server using the putty profile that you saved earlier when creating the public key (with your private key file saved under Connection->SSH->Auth)
    .
    Enter 'root' as the login, it will then authenticate the key that you have and you're in! (You may have to enter a password too if you used one during the creation of your ssh key pair).
    Was this step helpful? Yes | No


Questions and Answers

Hi, please can you tell me how can I generate an SSH key?

To create an SSH key pairing, you will need to use tools or software on your computer. Depending on the operating system that you're using, you may be able to do this directly on your computer, or you may have to download an additional piece of software to generate a key for you.

Was this helpful? Yes | No

Linux or Mac OS X

To generate an SSH key pairing in Linux or Mac OS X, you will need to use the ssh-keygen tool. Follow these simple steps to use this tool to create an SSH key pairing:

  1. 1
    Open your Terminal/Command Line program.
    Was this step helpful? Yes | No
  2. 2
    Type in $ ssh-keygen -t <type>.
    Was this step helpful? Yes | No
  3. 3
    Replace <type> with one of the following levels of encryption
    :
     
    1. DSA -- 1024-bit algorithm
    2. RSA -- 2048- to 4096-bit algorithm
    3. ECDSA -- Provides small key sizes and fast operation, but potentially less security
    Was this step helpful? Yes | No
  4. 4
    Press enter.
    Was this step helpful? Yes | No
  5. 5
    You will be asked to enter a password
    .
    This will make your keys extra secure, but this is not a necessary step.
    Was this step helpful? Yes | No
  6. 6
    Press enter.
    Was this step helpful? Yes | No
  7. 7
    Your computer will now save the key pairing in your ~/.ssh directory
    .
    The id_dsa file is your private key; id_dsa.pub is your public key. Do not share your private key with anyone.
    Advertisement
    Was this step helpful? Yes | No

Windows

To generate an SSH key pairing in Windows, you will need to use the PuTTYgen software linked in the VisiHow article above. Follow these steps to create an SSH key pairing:

  1. 1
    Was this step helpful? Yes | No
  2. 2
    Open the program.
    Was this step helpful? Yes | No
  3. 3
    Click SSH-2 RSA when asked what type of key you would like to generate.
    Was this step helpful? Yes | No
  4. 4
    Click Generate.
    Was this step helpful? Yes | No
  5. 5
    When PuTTYgen has finished generating your SSH key pair, you will now be asked to create a password for your keys
    .
    You don't have to create one, but it makes your key pair much more secure if you do.
    Was this step helpful? Yes | No
  6. 6
    Click Save for both the public and private keys.
    Was this step helpful? Yes | No
    Advertisement

You have successfully generated new SSH key pairs on your computer.

Public/private key generation using ssh key?

I using ovh server.I want to generate ssh login using public and private key combination through manage panel. So what is the process and how to generate ssh key without password?

VisiHow QnA. This section is not written yet. Want to join in? Click EDIT to write this answer.

Well, it's still asking for a password?

Well, it's still asking for a password

VisiHow QnA. This section is not written yet. Want to join in? Click EDIT to write this answer.

If you have problems with any of the steps in this article, please post in the comments section below.

Comments

VisiHow welcomes all comments. If you do not want to be anonymous, register or log in. It is free.

Article Info

Categories : Websites

Recent edits by: anit, Calob Horton, Dougie-1

Share this Article:

Thanks to all authors for creating a page that has been read 4,716 times.