Agent Installation
Agent Installation
Section titled “Agent Installation”Install the SSH-KLM agent on target hosts for deep discovery and automated key rotation.
Overview
Section titled “Overview”The SSH-KLM agent is a lightweight daemon that runs on target hosts, providing:
- Real-time key discovery
- Automated key rotation
- Ephemeral key management
- Secure communication with SSH-KLM server
Installation Methods
Section titled “Installation Methods”Script Installation (Recommended)
Section titled “Script Installation (Recommended)”# Download and run installercurl -fsSL https://get.qcecuring.com/ssh-agent | sudo bash -s -- \ --server https://ssh-klm.example.com \ --token YOUR_REGISTRATION_TOKENPackage Manager
Section titled “Package Manager”Ubuntu/Debian:
curl -fsSL https://packages.qcecuring.com/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/qcecuring.gpgecho "deb [signed-by=/usr/share/keyrings/qcecuring.gpg] https://packages.qcecuring.com/apt stable main" | sudo tee /etc/apt/sources.list.d/qcecuring.listsudo apt updatesudo apt install ssh-klm-agentRHEL/CentOS:
sudo dnf config-manager --add-repo https://packages.qcecuring.com/rpm/qcecuring.reposudo dnf install ssh-klm-agentDocker
Section titled “Docker”docker run -d \ --name ssh-klm-agent \ --restart unless-stopped \ -v /etc/ssh:/etc/ssh:ro \ -v /home:/home:ro \ -e SSHKLM_SERVER=https://ssh-klm.example.com \ -e SSHKLM_TOKEN=YOUR_TOKEN \ qcecuring/ssh-klm-agent:latestConfiguration
Section titled “Configuration”Edit /etc/ssh-klm-agent/config.yaml:
server: url: https://ssh-klm.example.com token: ${SSHKLM_TOKEN} # From environment
agent: hostname: ${HOSTNAME} labels: environment: production team: platform
discovery: enabled: true paths: - /home/*/.ssh - /root/.ssh - /etc/ssh interval: 1h
rotation: enabled: true backupKeys: trueVerify Installation
Section titled “Verify Installation”# Check agent statussudo systemctl status ssh-klm-agent
# View agent logssudo journalctl -u ssh-klm-agent -f
# Test connectivitysudo ssh-klm-agent statusTroubleshooting
Section titled “Troubleshooting”Agent Not Connecting
Section titled “Agent Not Connecting”# Check connectivitycurl -v https://ssh-klm.example.com/health
# Verify tokensudo ssh-klm-agent verify-tokenPermission Denied
Section titled “Permission Denied”# Agent needs read access to SSH directoriessudo usermod -aG ssh-klm-agent $(whoami)