SSH without stored keys: EnvMap signs a certificate for every session
A privileged access manager that stores every server's password is the most valuable thing on the network to steal. Since 0.7.79 EnvMap can store nothing for an SSH host. Each session gets a fresh key, signed for five minutes, for one login name.
EnvMap is an open-source, self-hosted control plane with a privileged access manager (PAM) in it. People open SSH, RDP and VNC sessions from the browser and never see the password or key, and every session is recorded.
Until 0.7.79 that meant EnvMap kept the credential, sealed in its database, and handed it only to the connection. That keeps it away from people. It does not keep it away from whoever steals the database and the key that seals it. Teleport's answer to that problem is short-lived certificates, and it is the one point where our comparison pages said Teleport was simply better. So EnvMap now does the same for SSH.
All of the code is in the repository, in app/sshca.py and the cert branch of _ssh_auth in app/pam.py.
What happens when somebody connects#
- EnvMap makes a new key pair for this session, in the session's own scratch directory. It has never existed before and is deleted when the session ends.
- EnvMap signs it with its own SSH certificate authority, for five minutes, for one login name: the target's username.
- The certificate names the person. Its key ID is
envmap:<their email>:<target>. - ssh connects with that key and certificate. The host accepts it because it trusts the authority, not because it knows the key.
This is a real certificate made by EnvMap's code for a target called web-lb-01, read back with ssh-keygen -L:
Type: ssh-ed25519-cert-v01@openssh.com user certificate
Signing CA: ED25519 SHA256:YwqG9MSbpRYX5IqPOxNtnvOGNZt2ID+YJd24YLE50nI (using ssh-ed25519)
Key ID: "envmap:alex@example.com:web-lb-01"
Valid: from 2026-11-29T21:58:38 to 2026-11-29T22:04:38
Principals:
deployIt opens one account, deploy, for six minutes: five, plus one minute backdated so a host whose clock runs a little behind does not refuse it.

What the host needs#
One line of sshd configuration. The public half of the authority goes in a file, and sshd is told to trust it:
echo 'ssh-ed25519 AAAA… envmap-user-ca' > /etc/ssh/envmap_ca.pub
echo 'TrustedUserCAKeys /etc/ssh/envmap_ca.pub' >> /etc/ssh/sshd_config
systemctl reload sshdSettings → Privileged Access shows the real public key and these commands. There is no agent to install and no daemon to run on the host. Then the target's credential is set to EnvMap certificate, and the target stores its address and login name and nothing else. The docs have the steps.
Who was it? The host's own log says#
Because the key ID names the person, sshd writes it into its own log beside the login. A sign-in looks like this (the addresses and fingerprints are examples):
Accepted publickey for deploy from 10.0.10.5 port 51234 ssh2:
ED25519-CERT SHA256:vnJi37… ID envmap:alex@example.com:web-lb-01 (serial 0)
CA ED25519 SHA256:YwqG9M…With a shared key, the host's log says "deploy" and nothing more, and the question "which of the four people with the key was it?" goes to EnvMap's audit log. With a certificate, the host answers it by itself.
What a stolen database is worth now#
For a target on certificates, the database holds an address and a login name. There is no key that opens the host. A certificate copied out of a running session stops working within minutes.
Said honestly, the risk moves rather than disappearing. The authority's own private key is now what matters, because it can sign a certificate for any host that trusts it. It is one key instead of one per host, and it is sealed like every other credential in EnvMap. The other difference is how a leak is fixed. Changing a leaked password means changing it on every host. A leaked authority is replaced with one button, Replace the authority…, after which the hosts are given the new public key.
Four small things the code had to get right#
- The authority's private key is never left on disk. It is written next to the session key only for the instant
ssh-keygensigns. The file is created new with0600, and it is removed in afinally, whether signing worked or not. ssh-keygenasks questions. File transfer reuses a target's working directory, andssh-keygenmeets an existing key file withOverwrite (y/n)?, a question with nobody to answer it. Every certificate is now made in a directory cleared first.- The identity is free text that lands in another system's log. An email and a target name could carry characters that confuse a log reader, so the key ID is cut to letters, digits and
@._:-. - Making an authority twice is refused. A second authority would lock every host that trusts the first out of EnvMap. Replacing it is its own button and its own entry in the audit log.
What it does not do#
- SSH only. RDP and VNC targets still use a stored credential, sealed and handed only to the connection. Teleport issues certificates for many more kinds of target, Kubernetes and databases among them. See EnvMap next to Teleport.
- No revocation list. A certificate lives five minutes, so the answer to "take it back" is to not issue the next one.
- sshd checks a certificate once, at sign-in. A session that opens in minute four keeps running after the certificate expires. How long a session may last is EnvMap's maximum duration setting, not the certificate.
- It does not put the authority on your hosts. That one line of configuration is yours to roll out, with whatever you already use: Ansible, cloud-init or a golden image.
- Host keys are not signed. EnvMap still pins each host's key the first time it connects, as for every SSH target.
Try it#
The quickest look is the demo, with nothing to install. To run EnvMap as a PAM and nothing else, on one machine:
curl -fsSLO \
https://raw.githubusercontent.com/ammar-hassoun/envmap/main/deploy/compose/compose.yaml
ENVMAP_MODE=pam docker compose up -dThen open http://localhost:8471, create the authority in Settings → Privileged Access, and add the line to a test host. More: the PAM page, access requests and the production gate, and how a session recording is built.
EnvMap home · Docs · GitHub