# SSH Key Pair Generator

Generate an SSH key pair (Ed25519 recommended, RSA 4096, or ECDSA P-256) with an OpenSSH-format public key ready for ~/.ssh/authorized_keys, a SHA256 fingerprint, and a PEM private key. Optional passphrase encryption. Runs locally.

> Canonical page: https://test.elysiatools.com/en/tools/ssh-key-generator

- **Category:** Security

- **Keywords:** ssh, key, ed25519, rsa, ecdsa, authorized_keys, openssh, keypair, ssh-keygen, fingerprint

## Overview

Generates an SSH key pair and formats the public key in OpenSSH one-line format.

- **Algorithm**:
  - **Ed25519** (recommended) — modern, small, fast, the default in OpenSSH since 2015. 256-bit security.
  - **RSA 4096** — large but widely compatible with very old SSH servers. Use only if Ed25519 isn't supported.
  - **ECDSA P-256** — compact alternative; less common than Ed25519.
- **Comment**: appended to the public key (e.g. `alice@laptop`). Helps identify the key in authorized_keys.
- **Passphrase**: if provided, the private key is encrypted (AES-256-CBC, PKCS#8).

Outputs:
- Public key in OpenSSH format (`ssh-ed25519 AAAA... comment`) — paste directly into `~/.ssh/authorized_keys`.
- SHA256 fingerprint (`SHA256:...`) for verifying the key over an insecure channel.
- Private key in PKCS#8 PEM. (Node cannot emit the OpenSSH private-key container natively; convert with `ssh-keygen -p` if you need the `BEGIN OPENSSH PRIVATE KEY` format.)

Everything runs locally; keys never leave the request.

## Inputs

- **Algorithm** (select)
- **Comment (e.g. user@host)** (text): alice@laptop
- **Passphrase (optional, encrypts private key)** (text): Leave empty for an unencrypted key…

## When to use

- When you need to set up secure, passwordless SSH access to a remote server or cloud instance.
- When you need to generate a modern Ed25519 or legacy RSA 4096 key pair quickly without using the command line.
- When you want to generate keys locally in the browser to ensure your private keys never traverse the network.

## How it works

- Select your preferred cryptographic algorithm, such as Ed25519, RSA 4096, or ECDSA P-256.
- Enter an optional comment to identify the key and a passphrase to encrypt the private key using AES-256-CBC.
- Click generate to run the cryptographic operations locally in your browser.
- Copy the resulting OpenSSH public key, SHA256 fingerprint, and PKCS#8 PEM private key.

## Use cases

- Provisioning a new Linux cloud server with a secure Ed25519 public key for SSH authentication.
- Generating a legacy RSA 4096 key pair to connect to older network hardware or legacy servers.
- Creating a passphrase-encrypted SSH key pair for secure deployment pipelines or automated scripts.

## Frequently asked questions

### Are my generated keys sent to a server?

No. All key generation runs locally in your browser and keys are never transmitted over the network.

### Which algorithm should I choose?

Ed25519 is recommended for modern systems due to its speed and security, while RSA 4096 is best for legacy compatibility.

### How do I use the public key on my server?

Copy the generated OpenSSH public key string and append it to the ~/.ssh/authorized_keys file on your remote server.

### Why is the private key in PKCS#8 PEM format?

Browser-based generation outputs standard PKCS#8 PEM. You can convert it to the OpenSSH private key format using ssh-keygen -p if required.

### Can I secure my private key with a password?

Yes. Entering a passphrase encrypts the private key using AES-256-CBC before outputting it.

## Related tools

- [PKCE Code Verifier & Challenge Generator](https://test.elysiatools.com/en/tools/pkce-code-verifier-generator): Generate, validate and verify OAuth2 / OIDC PKCE (RFC 7636) code_verifier and S256 code_challenge pairs. Three modes: (1) generate a fresh verifier + challenge from cryptographically secure random bytes at 256/384/512/768-bit entropy, (2) audit a verifier you already have against the RFC — length (43–128), charset \[A-Za-z0-9-._~\] and ≥256-bit entropy, and (3) verify a verifier/challenge pair by recomputing BASE64URL(SHA256(verifier)). Optionally build the full authorization-request URL and token-exchange body. Complements the generic nonce-generator (which only emits a verifier+challenge pair) with RFC-compliance auditing and pair verification.
- [HMAC Generator & Verifier](https://test.elysiatools.com/en/tools/hmac-generator-verifier): Compute an HMAC message-authentication signature over a message + shared secret using SHA-1/SHA-2/SHA-3/BLAKE2, or verify an incoming signature against the secret — with webhook presets for Stripe / Slack / GitHub and constant-time comparison
- [Markdown Table Generator](https://test.elysiatools.com/en/tools/markdown-table-generator): Generate formatted Markdown tables from CSV, JSON, or array data with alignment, header styles, width control, and merge hints
- [TOTP / HOTP Offline Code Generator](https://test.elysiatools.com/en/tools/totp-hotp-offline-generator): Generate RFC 6238 TOTP (time-based, 6/8 digits, 30/60s step) and RFC 4226 HOTP (counter-based) one-time passwords from a base32 shared secret, fully offline with HMAC-SHA1/256/512, plus an otpauth:// URI for importing into Google Authenticator / Authy
- [Argon2 Password Hash Generator](https://test.elysiatools.com/en/tools/argon2-password-hash-generator): Generate Argon2id password hashes with tunable memory, iterations, parallelism, salt length, and PHC output
- [llms.txt / AI Crawler Audit Generator](https://test.elysiatools.com/en/tools/llms-txt-and-ai-crawler-audit): Generate an llms.txt file (llmstxt.org v2 format: H1, blockquote summary, H2 file lists) from a live site crawl or a pasted page inventory, and audit robots.txt policies for GPTBot, ClaudeBot, PerplexityBot and Bytespider using the RFC 9309 matching algorithm — with allow/block previews and ready-to-paste directives.
- [BIP39 Mnemonic Phrase Generator](https://test.elysiatools.com/en/tools/mnemonic-bip39-generator): Generate or validate 12 to 24 word BIP39 mnemonic phrases with entropy and PBKDF2-HMAC-SHA512 seed output
- [Data Column Extractor](https://test.elysiatools.com/en/tools/data-column-extractor): Extract specific columns from tabular data with support for various formats and flexible column selection

## Samples

- [Android Image Processing Java Samples](https://test.elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
- [Android Image Processing Kotlin Samples](https://test.elysiatools.com/en/samples/android-image-processing-kotlin): Android Kotlin image processing examples including reading/saving images, scaling, and format conversion
- [Web Image Processing Python Samples](https://test.elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Web Image Processing Rust Samples](https://test.elysiatools.com/en/samples/web-image-processing-rust): Web Rust image processing examples including image read/save, scaling, and format conversion
