ToolypetMCP
intermediate3 minutessecurity

SSH Deployment Security Setup

Secure SSH deployment: generate key pairs, create passphrases, and set up key fingerprint verification.

sshdeploymentkey-managementdevops

Quando usar esta receita

Set up SSH keys for CI/CD deployment pipelines. Secure key pairs with passphrases and fingerprint verification to prevent unauthorized server access.

Etapas

1

Generate deployment key

Prompt:Generate Ed25519 SSH key pair with comment 'deploy@production-server' for CI/CD pipeline
2

Create key passphrase

Prompt:Generate a 5-word passphrase to protect the SSH private key
3

Create key fingerprint

Prompt:Generate SHA-256 fingerprint of the public key for server-side verification

Perguntas frequentes

Should CI/CD SSH keys have passphrases?

For interactive use, yes. For automated CI/CD, a passphrase complicates automation. Instead, use deploy keys with restricted permissions, IP allowlisting, and short-lived certificates.

How do I restrict SSH key access?

Use authorized_keys options: command restriction (force specific command), from restriction (IP whitelist), no-port-forwarding, and no-X11-forwarding. Principle of least privilege.

Receitas relacionadas