atsign-foundation / noports

Connect to any device with no external listening ports open

Home Page:https://noports.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sshnpd installer `universal.sh` starts systemd daemon looking for _key.atKeys file

JeremyTubongbanua opened this issue · comments

The APKAM flow in our installation instructions creates a file @alice_device.atKeys without the _key suffix.

This is the command that the device runs on the final APKAM step

~/.local/bin/at_activate enroll -a @<REPLACE>_device \
  -s <PASSCODE> \
  -p noports \
  -k ~/.atsign/keys/@<REPLACE>_device.atKeys \
  -d <DEVICE_NAME> \
  -n "sshnp:rw,sshrvd:rw"

Notice that we create a specific atKeys file using -k and the newly created file does not have the suffix _key.atKeys and just has .atKeys.

Our installation process creates the daemon and constantly loops looking for the keys file _key.atKeys until it is finally found and the daemon is started.

Since this file is never actually created, the daemon is never started.

Our current installation instructions flow will never work with this issue present.

I'd say the best solution for now would be to provide -k in the service files, and prioritize apkam keys.

This issue has naturally resolved itself, we've opted to add the _key to the documentation, since at_activate has built-in overwrite protection preventing from accidentally deleting the main pkam keys.