Can't connect to PROD after Windows reinstall

Good day Wappler,

After I re-install my PC to Windows 11 and importing one of my projects - I can’t no longer connect to my Hetzner server Production target.

What I did so far:

  1. Delete all existing cloud providers
  2. Added Hetzner with a new generated Hetzner API key
  3. Imported server
  4. Checked that Wappler’s SSH key is added in Hetzner

But when I click on System Check on production server error appears: root@95.**.**.***: Permission denied (publickey,password).

What would be a right step-by-step execution plan to fix that?

Did you backup your previous SSH key? If you generate a new one it won’t magically be inserted into existing servers

I has similar issure with DO after a drive failure.
After trying lots of suggested fixes I backed up database with navicat, removed the site competely from host and then I was able to recreate it with a new key.
Then restored data from backup.

No I didn’t. Is there any instruction from Wappler team regarding Windows how to do it? Where these are located?

All your personal SSH keys are stored on your computer user profile .ssh folder

This is a system wide folder with ssh keys, so you should always make sure you backup very securely.

@George Don’t get me wrong but there should be a least some documentation regarding this. If you don’t backup those file your access to the server is lost. Maybe it worth implementing that all your project related files are saved within the project folder.

But that is why we have an option to choose SSH key when creating a server, so you can choose a different one than your personal key, one that resides inside your project files.

But do note that if you share your project files you will be giving your private keys away as well.

This was a 3 years old Wappler project, when Remote Targets where configured outside of Resources Manager and I physically didn’t had such options.

I see. If it was based on the older docker machines, then those are even more difficult to backup.

For Resource Manager, using and generating SSH keys is easy. See:

I will see to enrich the creation confirmation message to alert you to backup the SSH key safely.

If you really lost your previous SSH key, you can try to add the new one, by using the server password that you can probably reset in Hetzner dashboard. The is a tool called ssh-copy-id for this. See:

https://www.ssh.com/academy/ssh/copy-id?hs_amp=true

In Hetzner if you have Cloud services you can enter to console:
image

If you don’t have root password, you can reset using Hetzner option, its under Rescue tab:

After that you have root access to server and can create new ssh key.

If server is ubuntu this can help you, if not in same tutorial you can choose different distribution of OS.

In Wappler’s Resource Nanager, when importing a server, you probably have created already an SSH key. So just use it

Thank you for advice, but I can’t reset root password because of this:

@George just for the reference this server was created by Wappler itself. There is 0 documentation regarding SSH keys, how to save them, how to use them and why there are not in project folder.

Should I explain that loosing access to Production target is a critical situation and maybe, just maybe, there is a little chance, that Wappler team will focus on some truly essential things like

  • developing more transparent production target management
  • informing their user about some feature deprecation
  • providing documentation or instruction in case of OS change

May I suggest you open a ticket with Hetzner to ask assistance in performing a password reset? Note this procedure might result in downtime for the website, as most likely the VPS will need to be rebooted in rescue mode

1 Like

@George is this behavior was improved in Wappler 6? So that Wappler would save per project SSH keys in Wapplers folder, not in some appdata location in Windows?

Yes now you can fully create and use SSH keys per project. Those are also saved in the project files.

See:

1 Like

Much appreciated for fast answer and your effort.