Not able to gain SSH root access in HAOS with RP4 2022.8.4

Dear Forum,

I am trying to get ssh access to my HAOS, to mount a USB stick containing my music library. I am failing miserably.
I installed the ssh addon, which gives nice access and even lets me do things like create a folder and edit the /etc/fstab with nano. But after a reboot, every change is gone.

Well I found this guide:

https://developers.home-assistant.io/docs/operating-system/debugging/

still, I cannot putty into the “real” ssh shell to be able to do the work I need to. I did the “CONFIG” stick thing, “ha os import” finished successfully, but when I try to ssh into port 22 of my instance, I get “Server refused our key”.
My key is the file generated by puttygen “privatekey.ppk”, presented to the putty via “connection->SSH-> Auth->private key for authentification”.

Is there anything I am missing?

Cheers,
Christian

As per guide you linked, to ssh directly to the host you need to use port 22222 (not 22)

I tried that, putty gives me a “connection refused”. I changed the port settings in the ssh addon

-----------------------------------------------------------
 Add-on: SSH & Web Terminal
 SSH & Web Terminal access to your Home Assistant instance
-----------------------------------------------------------
 Add-on version: 12.0.1
 You are running the latest version of this add-on.
 System: Home Assistant OS 8.4  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2022.8.4
 Home Assistant Supervisor: 2022.08.3
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------

to 22222, but it did just forward port 22222 to 22, giving me the same error as mentioned above. Port 22222 seems to be blocked or the “root ssh login on port 22222” functionality does not seem to be enabled.

BTW.: I do not know whether the “ha os import” command worked, it seems to always tell me “command completed successfully”.

Update:

I redid the the USB Stick and key file step and redid the “ha os import” thing, and now port 22222 is not blocked any more. Still I cannot login due to “Server refused our key”.

Update - Update

The Putty error message lead to this:

https://askubuntu.com/questions/204400/ssh-public-key-no-supported-authentication-methods-available-server-sent-publ,

taking the key out of puttygen and pasting it into the authorized_keys file worked, I do now have ssh access.

1 Like

You save my life !!!
I had the same problem and had been searching for hours!
Thanks a lot