Skip to content

"SSH access to the host" could be phrased more clearly #1564

Description

@pzduniak

Sorry for not fixing it myself, I don't have the capacity to commit to following through with a pull request.

Use a USB drive formatted with FAT, ext4, or NTFS and name it CONFIG (case sensitive). Create an authorized_keys file (no extension) containing your public key, and place it in the root of the USB drive. File needs to be ANSI encoded (not UTF-8) and must have Unix line ends (LF), not Windows (CR LF). See Generating SSH Keys section below if you need help generating keys. Use the CLI (eg. SSH to the SSH add-on on port 22) and import the authorized_keys file with the ha os import command. You can now access your device as root over SSH on port 22222. Alternatively, the file will be imported from the USB when the Home Assistant OS device is rebooted.

https://github.com/home-assistant/developers.home-assistant/blob/master/docs/operating-system/debugging.md#home-assistant-operating-system

This is quite confusing. The message reads as "this is how you prepare a drive to be accessible through Linux", since there's suddenly a "use the CLI and import the authorized_keys file with the ha os import command". I get that the next sentence states "the file will be imported from the USB when the Home Assistant OS device is rebooted", but in my particular case I needed to know how the OS interacts with the device. After asking questions on Discord and testing it empirically I now fully understand the intention of this paragraph, but I think it could be better.

To me, this section fails to serve both beginners and advanced users looking for quick answers by "condensing" the details too much.

I think that this section should begin by explicitly stating that you can either import it using ha os import (why bother with the USB then if you have SSH access?) or by booting the OS, which will auto mount the drive if it's called CONFIG.

I was thinking of something like:

Create an authorized_keys file (no extension), containing your public key. The file needs to be ANSI encoded (not UTF-*) and must have Unix line ends (LF), not Windows (CR LF). See Generating SSH Keys section below if you need help generating keys.

If you have access to the HA CLI (eg. through the SSH add-on , connecting to port 22), you can use the ha os import command to import the keys as following:

(...)

Otherwise, you can create a USB drive formatted with FAT, ext4 or NTFS and name it CONFIG (case sensitive). Place the authorized_keys file in the root of the drive's filesystem, insert the drive into the device and reboot. HAOS will automatically mount it if it is named correctly and apply the keys.

By clarifying when the drive is mounted, this should avoid confusion of users who rely on Raspberry Pi USB boot, which simply does not support this method (at least in my case - the device is stuck in a boot loop trying to use the CONFIG drive). Figured it out from first hand experience :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions