🆕[add-on] HassOS SSH port 22222 Configurator

HassOS SSH port 22222 Configurator


Put your SSH Key in the addon configuration, then start. The addon will enable Port 22222 ssh.

About

This project is a part of my HassOS Configurator project. The goal of this add-on, similar to root apps on Android, is to make a mole-hill out of a mountain.

Installation


Within Home Assistant, click Supervisor-> Add-on Store -> … button (in top left)-> Repositories. Add this repository.

Click "HassOS SSH port 22222 Configurator", then install.

Configuration

Copy your public key into the configurator in a single line as such

SSHKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGTlRAfhm9BIV6l6sOubRgeCY0wRhYQVfB3QBWFl2ELpeAnTHwRYY+4pSP1Nu7FuZqAzDyZkssmFkbXHJGqi6EAnAkRLsKhzvDKo5WSXfEQdl2kSN5bgU/e37GfwqG4ChEfY56gwu+tdHtt4eIrzKpmUKqFZWJaGoeI9sHptQR9QNitEsm0krkOcK0VLFLTeau+HOO1A4plcLjBB9Y43SFjth/Ouke+DVGaBO2LYNc8U0S4EiHT6KdRXS4iIwYjXMw6SEsT7eP9IWQObQ4ZgyG0cHO/6ArxJ0fyOcAI29sLzM9466ID0mTaJWHriTRf6Lxhpdd/S30VTG0JMTdo/Fj  root@HLAB-A17"

After saving, Home Assistant may change your input to look like this image

Operation

Hit the start button and observe the logs. You may uninstall the Add-On when complete.

FAQ

Frequently Asked Questions

Can i use a password?
Due to HA security model, no.

It didnt work! I mean, it didnt work?
Make sure you turn off protection mode.

It still didnt work! I mean, It still didnt work?
Did you run the app and then restart the hardware? Pull the plug and restart the physical hardware.

Its still not working! I mean, why isn't it working?
Try creating a new public/private key pair with ssh-keygen. You can do this on your computer or use a terminal app, then put the contents of the .pub file into the settings on this addon, then run the addon, unplug power and plug it back in.

30 Likes
How to get access at damn host system?
How do you create keys for SSH in Hass.IO and where do you put them?
Home Assistant Community Add-on: SSH & Web Terminal
Debug access with SSH without USB import
Edit Config.txt using RPi CM4
How to add SSH to base hassio image
Add Overclock capability to HA OS on raspberry pi
How to get access to the user root of Home Assistant (ova: Linux KVM.qcow2)?
Why must we use a USB drive to get development access?
Mounting an internal SSD
Where is home assistant source in Hass.Io
Memory leak: How to find whats causing it?
Command Line Access
Cleaning Up Unused Files to Free Up Disk Space
Alpine Linux command line from HAOS hardware?
HomeAssitant OS Not Listening on 8123? (Can't reach externally)
Image homeassistant/aarch64-addon-deconz:6.12.0 does not exist for addon_core_deconz
What's using my storage?
Where are the kernel modules?
Strange storage occupied on Ha
Development of add-on - why are the docs so sparse and unhelpful?
My Home Assistant dashboard with deep details
Supervisor Logs Extremely Slow to Open
Node red problem, cant update or install palette(s)
Command not found: nmcli
Remotely forget an SSID
Connecting to HA locally using HTTPS
How to access Home Assistant Yellow console?
Migrate to Z-Wave 800 Series GPIO HAT Controller (Zooz ZAC93) on RPI5 without manually reacquiring devices and maintain on-board Bluetooth
Install socat to new Home Assistant Blue
Home Assistant Community Add-on: SSH & Web Terminal
High disk usage
How to use firmware search path? (e.g. `/mnt/data/supervisor/share/firmware`)
Set or customize NTP source
[New Addon] Samba NAS. (Mount external disk and share it )
Help needed for hassio.stdin
Supervisor update 2021.06.8 to 2021.08.1 Failing
SSH Development Access (Core SSH, Root CLI)
Tuya integration problem: "login error (1013): request time is invalid"
[New Addon] Samba NAS. (Mount external disk and share it )
Where are the docker volumes on Home Assistant OS?
- ssh connection - haos_ova-9.5.vdi -
Raspberry PI5 NVME - PCIe gen config
PSA How to configure Proxmox for lower power usage
Import from USB - no success/error message
Mount external USB drive to RPi4
Where's the config.txt file
HA OS - Need help mounting external media or gaining root access - I've tried everything 😬
Addon Help - where's the config in my file system?
"Continue on error" not working
New, different IPv6 address every time
Home Assistant Yellow
Home Assistant Yellow - turn off status lights

From a fresh install on a Raspberry Pi 4, I configured my public key as per the instructions and performed a hard reboot. After the reboot, I was immediately able to login, even before the Web UI was available.

1 Like

As shown above, it goes into the HassOS SSH port 22222 Configurator Configuration screen.

Home Assistant may reformat it to look like this

1 Like

@adamoutler I have no expertise to know if this addon is technically good or has security implications, but if it stops the endless questions about accessing the host system it is more than welcome.

3 Likes

Yes. This addon violates the security model of home assistant, docker containers, and add-ons in general. The entire purpose of containerization is to contain an application and the entire purpose of this application is to remove the containment and modify the host system so that you can log in and modify the host system.
I’m positive this is a bad idea for security reasons. But, like you said. It’s intended to let people get on to hacking rather than ask endless questions in the forums.

9 Likes

I made some security changes by removing app armor. No need to Disable Security anymore.
from this:


to this:

What does this mean? I linked putty to the private key. I am able to connect to 22222, put in root as user and then I get this popup.

image

Looks like you put in the wrong public key. It’s easier to use WSL and apt install ssh, then understand what’s up with ssh -v [email protected]. I’m pretty sure you used the wrong key based on this though.

1 Like

I copied everything here, put in in configuration and ran the add on.

image

Did you start/restart the addon and reboot after?

Yes. I tried a 3rd time to make new key combo again, now getting this error when trying to start add on. image

Yah, I dunno WTH is going on now. I didnt get that 500 server error the first 2 times I did it.

Uninstalled add-on, restarted HA, installed add on, tried again. 500 error

1 Like

I’ll try again on a fresh machine tomorrow after I finish some tasks. It’s working for me.

@adamoutler, is this only available for arm? From https://github.com/adamoutler/HassOSConfigurator/blob/553195ec4728503ac17b38df6a187f6641119a1c/HassOsEnableSSH/config.json

 "arch": ["armhf", "armv7", "aarch64"],

I unplugged my HA device,as opposed to just restart, and the add-on worked again. But still no dice, connecting.

heres my config

Honestly I am just trying to get access to add an xml config file to the openzave config folder because it hasnt been added to official repo yet. Apparently I need host access so gave this a try, but Im spending too much time on it, lol. Ill just wait for repo to be updated.

You don’t have an sda1, sd1b, or mmcblk0p1 config.txt. What are you using? Is this windows? When you put a terminal app into Disable Protection Mode, what is the result of ls /dev/?

Currently your system is not supported, but I’d like it to be.

If you can show me an instance of HassOS on x86 with an sda1 “boot” partition, I will support it.

@adamoutler are you asking me? I am using home assistant blue (ODroid N2). But as I said, once I killed power to my device and then restored power and started the machine back up, I was able to use the add-on again. I still dont have access on 22222, but ill just wait for repo to be updated.

1 Like

Can you set your terminal addon to Disable Security, then run the following

ls /dev
mkdir /dev/sda1
mount /dev/sda1 /tmp/sda1
ls -alR /dev/sda1

I would like to see the output from the terminal. I can likely support your device with this.

@adamoutler

1 Like