Skip to content

Instantly share code, notes, and snippets.

@SirGoodenough
Last active January 17, 2023 07:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SirGoodenough/4f1bd1c267a58e64866d9e1d5aa87331 to your computer and use it in GitHub Desktop.
Save SirGoodenough/4f1bd1c267a58e64866d9e1d5aa87331 to your computer and use it in GitHub Desktop.
Suggested markdown for creation of encryption for backup addon

One suggested way to install ssh encryption for this addon

Generate a key

Open a terminal in HA using one of the terminal addons, the Code Server (VSCode) addon, or from the front end of HA pi, etc. Note Home Assistant OS and Supervised mode use the folder /ssl to store the encryption files in. This replaces the ~/.ssh folder many Linux distro's use.

At the terminal prompt:

cd ~/ssl

ssh-keygen -f ~/ssl/something-unique-ed25519 -t ed25519

Change something-unique-ed25519 to something else but the letters ed25519 might help you in future troubleshooting.

Answer the questions. It is not recommended to add a passphrase for this application.

Copy the key

At the terminal prompt:

ssh-copy-id -i ~/ssl/something-unique-ed25519 user@host

where something-unique-ed25519 matches the filename you generated above and user@host matches the username and host where you are remote storing the data.

The name something-unique-ed25519 will also be loaded in the addon configuration in the SSH private key box. user will match the username box. host will match the remote host box.

Setup known_hosts

At the terminal prompt:

ssh-keyscan -H 192.168.x.x >> ~/ssl/known_hosts

where the IP address matches the IP address of the remote host you are sending the file to. host value can also be used here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment