← All articles

Security

A calmer way to manage SSH deploy keys

Reduce copied private keys with clear ownership, least-privilege deploy users, rotation notes, and a documented recovery path.

Deployment credentials stored in a protected vault and used by a job

An SSH key is easy to create and surprisingly hard to track once it is copied into a CI secret, a laptop, a password manager, and a shared folder. The goal is not to add ceremony. It is to make access understandable and revocable.

Give deployment access a clear owner

Create a dedicated deploy identity for each application or environment. Grant only the commands and directories it needs, and avoid reusing a personal account for production automation.

Keep a short inventory of the key owner, hosts, purpose, creation date, and rotation procedure. A name like `prod-deploy` is useful only when someone can tell which service it belongs to.

Store the private key once

Use a managed secret store rather than copying private key material into chat or personal home directories. Limit who can retrieve or use it, and keep access events available to the people responsible for the service.

Never place secrets in command-line arguments, deployment logs, or a repository. If a key is exposed, revoke it at the server and replace it; deleting the local copy is not a complete response.

Practice rotation before an incident

Add a second key, verify it works from the deployment path, then revoke the old key. Record how to recover access if the primary maintainer is unavailable.

For a small team, a one-page inventory and a tested rotation checklist are often more useful than a complicated key-management process nobody follows.

A calmer way to manage SSH deploy keys | PlainShip Blog