Can't SSH into VPS Hosting after a rebuild


Browse by products and services

  • Applies to: VPS Hosting
    • Difficulty: Easy
    • Time Needed: 5-10
    • Tools Required: SSH, Computer File Access

Overview

After performing a server rebuild, you might experience a host identification error in your SSH client:
vps-ssh-01.png

This occurs because your device is attempting to use an old host key to connect to the server. To fix this, you will just need to disable the old key in your host files.

Instructions

  1. Read through the error until you find the offending file path and line number. In this example, the file location is /Users/USERNAME/.ssh/known_hosts and the line number is line 36.
    vps-ssh-03.png
  2. On your computer, navigate to the file location. Then open the file with your preferred text editor. In this example, we used the free program, Visual Studio Code.
    vps-ssh-04.1.png
  3. Locate offending line (in this example line 36) and add a hash sign (#) to the beginning. This will disable the old host key.
    vps-ssh-05.png
  4. Save the file.
  5. You should now be able to SSH into your server!

Resources