Skip to content

Instantly share code, notes, and snippets.

@arkku
Created October 5, 2017 14:56
Show Gist options
  • Save arkku/dc92afc8c84bcd46abb76ad8d4035895 to your computer and use it in GitHub Desktop.
Save arkku/dc92afc8c84bcd46abb76ad8d4035895 to your computer and use it in GitHub Desktop.
SSH key authentication (only) for UniFi
config.system_cfg.1=sshd.auth.key.1.status=enabled
config.system_cfg.2=sshd.auth.key.1.value=AAAA…Z
config.system_cfg.3=sshd.auth.key.1.type=ssh-rsa
config.system_cfg.4=users.1.password=x
@arkku
Copy link
Author

arkku commented Oct 5, 2017

Currently (October 2017) the UniFi controller does not have an option in the UI to set ssh keys. One can be set using the above contents placed into the site's config.properties file (e.g., /usr/lib/unifi/data/sites/default/config.properties on Linux). The ssh-rsa key goes on the second line (without the common trailing user@host comment). The last line seems to work for disabling the password, even though it results in a duplicate line for users.1.password in the file.

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