RSA SSH Key Generator

security

Keys are never stored on the server. All generation runs in your browser.

Algorithm

Key Size

Passphrase (optional)

Encrypts the private key. Leave empty to generate an unencrypted key.

1. How to Use

  1. Select key size: 4096 bits recommended; 2048 minimum for current security standards.
  2. Click 'Generate' to create an RSA key pair. Larger keys take slightly longer to generate.
  3. Enter an optional passphrase to encrypt the private key.
  4. Copy the public key (ssh-rsa AAAA...) and add it to authorized_keys or your Git/cloud provider.
  5. Store the private key securely. Use ssh -i or configure IdentityFile in ~/.ssh/config.

2. How It Works

RSA relies on the mathematical difficulty of factoring large semiprimes. Key generation: choose two large random primes p and q (each 1024+ bits for 2048-bit RSA). Compute n = p × q (the modulus) and φ(n) = (p-1)(q-1).

Choose public exponent e (typically 65537). Compute private exponent d ≡ e⁻¹ (mod φ(n)). Public key is (n, e); private key is (n, d). Encryption: c = m^e mod n. Decryption: m = c^d mod n = m^(ed) mod n. By Euler's theorem, m^(φ(n)) ≡ 1 (mod n), so m^(ed) ≡ m when e·d ≡ 1 (mod φ(n)).

SSH uses RSA for signing: sign(m) = m^d mod n; verify(signature) checks signature^e mod n == m (with appropriate padding, e.g., PKCS#1 or PSS).

Security: 2048-bit RSA ≈ 112-bit symmetric; 4096-bit ≈ 128-bit. Factoring n is believed to be infeasible for sufficiently large n.

3. About RSA

RSA is the most widely supported SSH key algorithm. It has been used for decades and is supported by virtually every SSH server, client, and service—including legacy systems that may not yet support Ed25519 or ECDSA.

This RSA SSH key generator produces keys in OpenSSH format. Choose 4096-bit for maximum security or 2048-bit for faster operations where compatibility is paramount.

All generation runs in your browser. RSA key generation is computationally heavier than Ed25519, so 4096-bit keys may take a few seconds.

4. Advantages

  • Maximum compatibility: Supported by every SSH implementation, including old servers and embedded devices.
  • Proven: Decades of use; well-understood security and implementation.
  • Flexible key sizes: 1024–8192 bits to balance security and performance.
  • Universal: Works with GitHub, GitLab, AWS, Azure, GCP, and any SSH-compatible service.

5. Real-World Use Cases

  • Legacy systems: When the server or client does not support Ed25519 or ECDSA.
  • Enterprise: Many corporate policies and tools are built around RSA keys.
  • Maximum compatibility: When deploying keys across diverse or unknown environments.
  • Regulatory: Some standards or audits specifically require RSA.