configizer icon indicating copy to clipboard operation
configizer copied to clipboard

SSH keys configured in config.sh file are added to config.json, do not replace it

Open etcetc opened this issue 5 years ago • 2 comments
trafficstars

Currently, the update script explicitly adds any new keys specified in the config.sh file to the os.sshKeys entry of config.json. While it seems this is the desired behavior, it has undesirable effects.

  1. It becomes very difficult to keep a reference config.sh for the group of field devices
  2. It becomes very difficult to deprecate and replace ssh keys

To reproduce issue:

  1. check the config.json file on the target device. Check that the value for key os.sshKeys is empty.
  2. Add an ssh key in config.sh script, e.g. SSHKEYS=("ssh-rsa AAAA ..... testKey")
  3. Configure the key for the test unit in batch
  4. run the run.sh script.
  5. View the config.json file on the target device. It will now include the specified key
  6. Change the key in config.sh
  7. Remove config.log and run run.sh again
  8. View the config.json file on the target device. It will now include two copies of the specified key

etcetc avatar May 20 '20 20:05 etcetc

[saintaardvark] This issue has attached support thread https://jel.ly.fish/#/728a48e0-84fa-4209-9509-88f613cbafd2

jellyfish-bot avatar May 20 '20 20:05 jellyfish-bot

issue addressed in https://github.com/etcetc/configizer

etcetc avatar Jun 12 '20 21:06 etcetc