-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
README: link to documentation on readthedocs
- Loading branch information
Showing
1 changed file
with
4 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,7 @@ | ||
# theo-agent | ||
Theo agent | ||
## Theo agent | ||
|
||
## Install | ||
- [Linux install](#linux-install) | ||
theo-agent is the command line program used to fetch `authorized_keys` from [theo](https://github.com/theoapp/theo-node) server | ||
|
||
### Linux Install | ||
### Documentation | ||
|
||
1. Simply download one of the binaries for your system: | ||
|
||
``` | ||
# Linux x86-64 | ||
sudo curl -L -o /usr/sbin/theo-agent https://github.com/theoapp/theo-agent/releases/download/$(curl -L -s -H 'Accept: application/json' https://github.com/theoapp/theo-agent/releases/latest |sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/')/theo-agent-linux-amd64 | ||
# Linux arm | ||
sudo curl -L -o /usr/sbin/theo-agent https://github.com/theoapp/theo-agent/releases/download/$(curl -L -s -H 'Accept: application/json' https://github.com/theoapp/theo-agent/releases/latest |sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/')/theo-agent-linux-arm | ||
``` | ||
|
||
2. Give it permissions to execute: | ||
|
||
``` | ||
sudo chmod 755 /usr/sbin/theo-agent | ||
``` | ||
|
||
3. Create a Theo Agent user: | ||
|
||
``` | ||
sudo useradd -r --comment 'Theo Agent' --no-create-home --shell /bin/false theo-agent | ||
``` | ||
|
||
4. Install | ||
|
||
1. Full Automatic install | ||
|
||
``` | ||
sudo theo-agent -install -no-interactive -sshd-config -url ${THEO_URL} -token ${THEO_CLIENT_TOKEN} | ||
``` | ||
2. Semi-Automatic install | ||
``` | ||
sudo theo-agent -install -no-interactive -url ${THEO_URL} -token ${THEO_CLIENT_TOKEN} | ||
``` | ||
Edit `/etc/ssh/sshd_config` as suggested | ||
3. Semi-manual install | ||
``` | ||
sudo theo-agent -install | ||
``` | ||
Answer to the questions and edit `/etc/ssh/sshd_config` as suggested | ||
4. Manual install | ||
Create a `config.yml` file (default is */etc/theo-agent/config.yml*): | ||
``` | ||
url: THEO_URL | ||
token: THEO_CLIENT_TOKEN | ||
``` | ||
Create a cache directory (default is */var/cache/theo-agent*): | ||
``` | ||
mkdir /var/cache/theo-agent | ||
chmod 755 /var/cache/theo-agent | ||
``` | ||
Modify `/etc/ssh/sshd_config` (if you changed the default path, add the options to the command) | ||
``` | ||
PasswordAuthentication no | ||
AuthorizedKeysFile /var/cache/theo-agent/%u | ||
AuthorizedKeysCommand /usr/sbin/theo-agent [-config-file /path/to/config.yml] [-cache-path /path/to/cache/dir] | ||
AuthorizedKeysCommandUser theo-agent | ||
``` | ||
Available at [theoapp.readthedocs.io](https://theoapp.readthedocs.io/en/latest/) |