Skip to content

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 :3080 with a self-signed certificate. Traefik terminates TLS for teleport.home.janwiebe.eu and forwards to it (serversTransport with insecureSkipVerify). tsh and 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 with managed: true) runs the teleport SSH agent with labels type, pve_node and app. The agent version always equals the server version (agents may not be newer than auth); when community-scripts update-apps upgrades 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-token on 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 teleport 18.7.3 apt package that pinned the CA of an earlier, rebuilt server) gets proc/ and host_uuid moved 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: /metrics on :3000 (Prometheus app_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.