Skip to content

Commit

Permalink
README: link to documentation on readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
macno committed Jan 13, 2019
1 parent 6441fda commit 35b4e31
Showing 1 changed file with 4 additions and 75 deletions.
79 changes: 4 additions & 75 deletions README.md
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/)

0 comments on commit 35b4e31

Please sign in to comment.