Skip to content

tailscale/tskagent

tskagent

GoDoc CI

This repository provides a tskagent ((T)ailscale (S)SH (K)ey Agent) library and program that implements the SSH key agent protocol hosting keys stored in setec.

To install the agent binary:

go install github.com/tailscale/tskagent/cmd/tskagent@latest

To run the agent, you must provide:

  1. The URL of a setec server instance,
  2. A non-empty secret name prefix to serve from, and
  3. A path to a local socket to serve the agent protocol.

For example:

tskagent --server https://setec.example.com \
         --prefix prod/example/ssh-keys/ \
         --socket $HOME/.ssh/tskagent.sock

Once this is running, you can access the agent using the standard tools, for example you can list the available secrets by running:

export SSH_AUTH_SOCK="$HOME/.ssh/tskagent.sock"
ssh-add -L

The agent loads all the secrets matching the specified name prefix once at startup. The value of each secret must be a PEM-formatted private key. The agent logs and ignores any secrets that do not have this format.

By default, keys are loaded from setec only once when the agent starts up. Use --update to make it poll at the specified interval for new secret versions. The agent does not allow the client to add new secrets. It does allow the client to "delete" the local copy of a secret from the agent (ssh-add -d), but note that this only affects the agent's copy, it does not remove the key from setec.

About

An SSH agent implementation over setec.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages