This is how i installed hass.io on ubuntu with docker / portainer via ssh

Great write up! Do you have instructions on changing the SSH port?

It’s easier to just change the ssh add on port and leave the host port alone. Not sure why you need supervisor or port 22222.

I’ve read that the hass.io SSH server add-on had a fixed SSH port, and there are no instructions on how to change the port.

The recommendation I believe is to use the community addon where you can change the port. When I read the instructions pretty sure it even said you can’t use the normal addon.

I could not find an option to change the SSH add-on port.

Ahh I see you are referencing this:

check out this it has a way to enter root ssh

Blockquote > Gaining true root access to HassOS

HassOS based Hass.io

Use a USB drive formatted with FAT, ext4, or NTFS and name it CONFIG (case sensitive). Create an authorized_keys file containing your public key, and place it in the root of the USB drive. From the UI, navigate to the hass.io system page and choose “Import from USB”. You can now access your device as root over SSH on port 22222. Alternatively, the file will be imported from the USB when the hass.io device is rebooted.

From <https://developers.home-assistant.io/docs/en/hassio_debugging.html#hassos-based-hassio&gt;

danrspencer provides more detail here 73 on the SSH process to create credentials between the Pi and the PS4

SSH into the true root of your Pi running HASS.IO :

Use the SSH home-assistant guide 61 to get to the true root of your Pi from Windows.

To do this, you’ll need to

  • Create a public/private RSA key pair, (use PuTTygen.exe to create a new public and private key)
  • Copy public key text generated by puttygen.exe
  • 2 ways to add the public key to hassos

Use the feature >hassio >system >import from usb. See

Put the public key text onto the root of the boot partition named authorized_keys ( save with no file extention) of your HASS.IO Pi’s SD card

  • Install the private key into your SSH software on your Windows machine.
  • Put the SD card back into the Pi,
  • Boot up,
  • SSH into your Pi’s root (ssh [email protected] -p 22222).
  • Type the passphrase you used when creating the private key with puttygen.exe earlier

used in this post

Awesome! Thanks so much for this. Exactly what i was wanting to setup. Worked perfectly

1 Like

Good day,
Could anyone assist me please.
Everything goes smoothly until i need to install hass.io.
It gives me the following error:
"bash: line 97: /etc/hassio.json: Permission denied.

With thanks

Did you switch to root?

Linux noob here so my apologies. I added “sudo” before the command and it gave me that error. But the installation started when i first did “sudo -s”
Thank you @silvrr

If your a Linux noob I would recommend these instructions.

While you are waiting on the install, research what each command does.

1 Like

Everytime I run this line I get “mkdir: cannot create directory ‘/usr/share/hassio’: Permission denied”.

Some questions I have:

  • Is that install file specifying the path for it to be installed to?
  • Why am I being denied permission even after adding sudo?
  • Do I need to specify a folder I have permission to and if so how do I do this?
  • I installed docker-ce and portainer and they are running fine. Where in these commands is it specifying for it to be installed in a docker container?

Thank you!

did you use sudo -s to get root / admin mode

My apologies. I see where you addressed this with other users above. That did get me further along. It looks like it installed everything a started running Hass.io. However, in Portainer I only see 2 containers: Portainer and hassio_supervisor. When running docker ps, I only see Portainer.

Does it simply take time for Hass.io to install and show up properly?

not sure i proably don’t know much more than you do, but there should be 2 containers running, hass.io supervisor and home assistant. Maybe hass.io supervisor is still isntalling…

It didn’t work. The supervisor says it was created in portainer but I cannot start it. Portainer says that it doesn’t exist. I setup the portainer as local. Is that correct?

hi, i’ve installed hassio on ubuntu 18.04 (and on docker) and i want to get persistent my usb, i try to connect [email protected] -p 22222 but give me connection refused, can you help a newbie? :slight_smile:
When i go hassio/system i can’t view import from usb…

you’ll need to find a guide on how to setup ssh in ubuntu and assign a port that is not 22. you need to login physically to the computer to do this.

this worked for me, thank you for the clear instructions

the hassio install script fails to connect with the docker daemon after:

[info] Install supervisor Docker container

Anyone have any ideas why?