Teleport¶
| URL | https://teleport.home.janwiebe.eu |
| Server | LXC teleport (CT 164, node05), community-scripts, Teleport Community Edition v18 |
| Cluster name | teleport |
| Code | roles/teleport_server, roles/teleport_agent, playbooks/teleport.yml |
| Semaphore | template teleport, schedule teleport agents every hour at :25 |
How it fits together¶
- Server (auth + proxy + ssh) listens multiplexed on
:3080with a self-signed certificate. Traefik terminates TLS forteleport.home.janwiebe.euand forwards to it (serversTransportwithinsecureSkipVerify).tshand the agents get through Traefik with Teleport's ALPN connection upgrade, so no extra ports are open. - Agents: every host in
managed(all PVE nodes, every running LXC, VMs withmanaged: true) runs theteleportSSH agent with labelstype,pve_nodeandapp. The agent version always equals the server version (agents may not be newer than auth); when community-scriptsupdate-appsupgrades the server, the next run upgrades the agents. - Joining: the playbook only creates a join token (
tctl tokens add --type=node --ttl=1h) when some host has not joined yet; the token is written to/var/lib/teleport/join-tokenon those hosts and expires after an hour. Joined hosts keep their identity in/var/lib/teleport. - Stale identities: a host that has a Teleport identity but is not registered in this
cluster (node01/04/05/06 had an April install of the
teleport18.7.3 apt package that pinned the CA of an earlier, rebuilt server) getsproc/andhost_uuidmoved to/var/lib/teleport/stale-<timestamp>/and rejoins. The old apt package is removed: its updater would otherwise replace the binary with one newer than the auth server. - New hosts join automatically on the next hourly run. The last task of the playbook lists managed hosts that are not registered in Teleport.
- Skipped: Alpine LXCs (Teleport is built against glibc), guests without systemd, and
guests with less than 600 MB free on
/(reported in the job output). - Monitoring:
/metricson:3000(Prometheusapp_metrics), web UI probe, NetBox service.
Logging in¶
The admin user is teleport-admin (roles editor, access, logins root, alex).
To (re)set its password and MFA, on the Teleport LXC:
tctl users reset teleport-admin
and open the printed link. Then from a workstation:
tsh login --proxy=teleport.home.janwiebe.eu --user=teleport-admin
tsh ls
tsh ssh root@wp-minecraft02-new
Removing a host¶
Stop/remove the guest, then tctl rm node/<host-uuid> (find it with tctl nodes ls).
Teleport also drops nodes by itself once their heartbeat expires.