This example shows how to deploy epithet with the built-in OIDC-based policy server for a small team.
ssh-keygen -t ed25519 -f ca_key -N "" -C "epithet-ca"This creates:
ca_key- Private key (keep secret!)ca_key.pub- Public key (distribute to target hosts)
Copy policy.example.yaml to policy.yaml and edit:
cp policy.example.yaml policy.yaml
editor policy.yamlUpdate:
ca_public_key: Paste contents ofca_key.puboidc: Your OIDC provider URLusers: Add your team members
# Terminal 1: Start CA server
./epithet ca \
--key ./ca_key \
--policy http://localhost:9999 \
--listen :8080
# Terminal 2: Start policy server
./epithet policy \
--config policy.yaml \
--ca-pubkey "$(cat ca_key.pub)" \
--listen 0.0.0.0:9999Create ~/.epithet/config.yaml:
# Host patterns are obtained from CA discovery - no static match config needed
agent:
ca-url: http://localhost:8080
auth: epithet auth oidc --issuer https://accounts.google.com --client-id YOUR_CLIENT_IDStart the agent:
epithet agentAdd to ~/.ssh/config:
Include ~/.epithet/run/*/ssh-config.conf
ssh alice@server.example.comThe first time:
- Browser opens for OIDC authentication
- You authenticate with your identity provider
- Policy server validates your token and issues a certificate
- SSH connection proceeds with the certificate
Subsequent connections within the refresh token lifetime (~hours) will be fast (~100-200ms).
policy.example.yaml: Template policy configurationsystemd/: systemd service units for production deploymentdocker/: Docker Compose setup for containerized deploymentREADME.md: This file
See the policy server guide for detailed configuration and authorization documentation.
See systemd/ directory for service unit files.
# Install binaries
sudo cp epithet /usr/local/bin/
# Install configuration
sudo mkdir -p /etc/epithet
sudo cp ca_key /etc/epithet/
sudo cp policy.yaml /etc/epithet/
sudo chmod 600 /etc/epithet/ca_key
sudo chmod 640 /etc/epithet/policy.yaml
# Install and start services
sudo cp systemd/*.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable epithet-ca epithet-policy
sudo systemctl start epithet-ca epithet-policy
# Check status
sudo systemctl status epithet-ca epithet-policySee docker/ directory for containerized deployment.
cd docker
docker-compose up -d
# Check logs
docker-compose logs -fOn each target SSH server:
sudo mkdir -p /etc/ssh/ca
sudo curl -o /etc/ssh/ca/epithet.pub http://ca-server:8080/Edit /etc/ssh/sshd_config:
# Trust epithet CA for user certificates
TrustedUserCAKeys /etc/ssh/ca/epithet.pub
# Optional: Require certificate authentication
PubkeyAuthentication yes
AuthenticationMethods publickey
Restart sshd:
sudo systemctl restart sshdFor additional host-side validation:
# Create a script that validates principals
sudo tee /usr/local/bin/check-principals.sh > /dev/null << 'EOF'
#!/bin/bash
# Check if the principal matches the local username
if [ "$1" = "$(whoami)" ]; then
echo "$1"
fi
EOF
sudo chmod +x /usr/local/bin/check-principals.shAdd to /etc/ssh/sshd_config:
AuthorizedPrincipalsCommand /usr/local/bin/check-principals.sh %u
AuthorizedPrincipalsCommandUser nobody
- Policy server guide - Configuration and authorization details
- OIDC setup - Provider configuration
- epithet-aws - AWS Lambda deployment