How to Rebuild Hetzner server and log in via SSH

Last updated on February 6th, 2023 at 01:55 pm.

How to Rebuild Hetzner server and log in SSH - Reset/ Refresh Hetzner cloud server with new OS

Let’s say that , after deploying your Hetzner Cloud server with Debian, you decide that you want Ubuntu 22.04. 

The video above will show you how to rebuild your server and deploy a new OS or the same operating system afresh.

After deploying your fresh new install, you will also see how to successfully log in via SSH.

When you rebuild your Hetzner server, the following are true:

  • Your IP will not change
  • Your billing plan will not change
  • You may reinstall the same OS or a different one
  • You will get a new root user with new credentials. The login credentials will be emailed to you.

Watch the short video above to see how to rebuild/refresh your Hetzner cloud server. You may also watch this Hetzner Server refresh video on YouTube.

You may also encounter the error : Warning remote host identification has changed. If you are looking for Warning remote host identification has changed fix, you will find it in the video above too.

Related : Hetzner Tutorial for beginners.

Video Captions:

In this video, let’s see how to reset your Hetzner Cloud Server. Maybe you have a VPS with Hetzner and you want to refresh it. You want to refresh the server so that you can start from scratch.

What you can do is, you will first go into the server that you want to refresh, and I will go into this server. Just click on it on Hetzner it’s called rebuild. If you want to refresh this Server, just click here on rebuild, and then you can choose the operating system.

Currently, it is using Debian 11, but maybe I want to use Ubuntu 22.04. You can search for the operating system that you want to use right there. You can also install all these other applications that are supported on Hetzner. I will just search for Ubuntu and you can see I can install Ubuntu 22.04. I’m just going to click there on rebuild, and then I will copy the name of the server.

Then I will paste the name of the server as a confirmation. And then I can now rebuild the server. It’s going to rebuild this server with Ubuntu. Right now it’s refreshing the server. It’s going to send me all the details. 

The login details for the server will be sent to my email. Next, let’s  log into the server. I’m going to open up Git Bash. You can see the details have been sent to me for my new server. Let’s try and log into this server. I will first copy the IP.

SSH user is root.

Enter. You can see that mine has refused to connect because the host has changed. Let’s try that again. When this happens, what I need to do is, I need to go into this hosts file and then inside this file, I need to delete the IP address. If I go inside that folder that I’m being told. Where is it located? It’s inside here.

Copy. Ctrl L to clear the screen. Let me open it with code.

And that’s going to open Visual Studio Code. Look for the IP that you need to delete. What is the IP? 116

Let me do Ctrl f Ctrl V.

231 that is the IP. It starts from here. These 3. 116 203…

And I can delete that.

Do CTRL S to save.

Once I save it, I can come back. I will try to log in on Git Bash. And this time round it is going to ask me; are you sure you want to continue connecting? Yes, I am sure. I’ll just type in yes, and then it will be added to the hosts file, and this time round I can come back here to copy the root password.

And I will paste the password. Hit  enter. I’m required to change the password. I’ll enter the old password again, enter. And then create a new password.

All right, there you go. You can now see that it’s telling me that my server is Ubuntu right there. That’s how to reset your server. We also encountered an error that you’re probably going to encounter as well if you’re on Linux, especially. You’re going to. You’re definitely going to encounter it on Linux or Mac. On a Mac, you may also experience that error. When you do, don’t worry about it. You know how to fix it. Just go into the known-hosts file and look at the location and then open it to delete the IP from it.

That’s pretty much it for this video for how to reset your Hetzner server. If you want to rebuild it, this is how to do it.

Comment Here

Join this free course:

How to host multiple WordPress
websites on a VPS

Close me!