# Teleport

We're using Teleport to access our internal resources.

## Get started

Teleport has a [great quick start guide](https://goteleport.com/docs/connect-your-client/introduction/).

### Web UI

You can access SSH console and Apps right from the browser. Navigate to <https://t.bksp.in> and login with your BKSP ID account.

### CLI

If you frequently use SSH access, you may find the `tsh` CLI tool much more convenient. Please follow the [installation guide](https://goteleport.com/docs/connect-your-client/tsh/#installing-tsh).

After install, you need to sign in with your BKSP ID account:

```bash
tsh login --proxy=t.bksp.in 
```

That's a one-time operation. Your session will be valid for 8 hours, after which `tsh` will automatically re-authenticate you if needed.

Now you can use `tsh` to establish ssh connection:

```bash
tsh ssh root@host
```

You can also generate ssh config to automatically use `tsh` when connecting to bksp hosts:

```bash
tsh config >> ~/.ssh/config
ssh root@host.bksp # works just like tsh ssh root@host
```

## Cluster Management

### How to use Agents’ auto-upgrade feature?

First, you need to prepare a Teleport Resource Definition with the upgrade policy:

```yaml
kind: autoupdate_version
metadata:
  name: autoupdate-version
spec:
  agents:
    start_version: 18.4.1
    target_version: 18.4.2
    schedule: regular
    mode: enabled
```

Update policy in Teleport Auth Controller:

```yaml
# Log-in to Secbox
tsh ssh root@secbox

# Import the updated autoupdate_version policy
docker exec -it teleport tctl create -f # ... then paste it, press Return & Ctrl+D

# Manually trigger agents to self-update, out of maintenance window
docker exec -it teleport tctl autoupdate agents start-update default

# Track rollout status
docker exec -it teleport tctl autoupdate agents status
```

---

**Documents**

- [BKSP 101](https://wiki.bksp.in/s/public/doc/bksp-101-HvrtlzB32F)
- [Проекты](https://wiki.bksp.in/s/public/doc/proekty-yjWZscgTvo)
- [Infrastructure](https://wiki.bksp.in/s/public/doc/infrastructure-VPKsJwVSVh)
- [Пространство](https://wiki.bksp.in/s/public/doc/prostranstvo-UF1eSbQDi5)
- [Equipment](https://wiki.bksp.in/s/public/doc/equipment-t5MYAVJ8l0)
- [Other](https://wiki.bksp.in/s/public/doc/other-uPW1YJQaRt)