From 0ef87d973fa041e5706d8e0c5589318e86ba9f04 Mon Sep 17 00:00:00 2001 From: 7marcus9 <7m9_c3hgit@7m9.eu> Date: Sat, 31 Dec 2022 22:40:06 +0100 Subject: [PATCH] updated instructions --- INSTALL.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index b7a6f3e..836fecc 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,3 +1,5 @@ +# Create Users for ssh operation +```bash sudo useradd unlock -m -s /opt/keymatic/keymatic.py sudo useradd lock -m -s /opt/keymatic/keymatic.py sudo useradd open -m -s /opt/keymatic/keymatic.py @@ -12,14 +14,29 @@ sudo ln -s /opt/keymatic/authkeyfile/authorized_keys /home/unlock/.ssh/authorize sudo ln -s /opt/keymatic/authkeyfile/authorized_keys /home/lock/.ssh/authorized_keys sudo ln -s /opt/keymatic/authkeyfile/authorized_keys /home/open/.ssh/authorized_keys sudo ln -s /opt/keymatic/authkeyfile/authorized_keys /home/door/.ssh/authorized_keys +``` - +# Configure Keymatic (Create user) +```bash https://www.npmjs.com/package/keyble sudo apt install npm sudo npm install --update --global --unsafe-perm keyble sudo keyble-registeruser --user_name PI --qr_code_data M001A..... +``` +# Create config create config.py +# Automatic Update of SSH Keys from LDAP +```bash crontab 2 * * * * cd /opt/keymatic;./update_keys.py +``` + +# Optional: Create SSH-User for locking with HASS +```bash +sudo useradd lock-hass -m -s /opt/keymatic/keymatic.py +sudo mkdir /home/lock-hass/.ssh +sudo chown lock-hass.lock-hass /home/lock-hass/.ssh +#add authorized_keys entry +```