ToolypetMCP
intermediate3 minutessecurity

SSH Deployment Security Setup

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

sshdeploymentkey-managementdevops

इस रेसिपी का उपयोग कब करें

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

चरण

1

Generate deployment key

प्रॉम्प्ट:Generate Ed25519 SSH key pair with comment 'deploy@production-server' for CI/CD pipeline
2

Create key passphrase

प्रॉम्प्ट:Generate a 5-word passphrase to protect the SSH private key
3

Create key fingerprint

प्रॉम्प्ट:Generate SHA-256 fingerprint of the public key for server-side verification

अक्सर पूछे जाने वाले प्रश्न

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.

संबंधित रेसिपी