What does the SSH Public Key Fingerprint Generator do?
The SSH Public Key Fingerprint Generator & Type Inspector parses OpenSSH public keys (such as ssh-ed25519, ssh-rsa, ecdsa-sha2-nistp256, and ssh-dss) and computes SHA256 (used by GitHub/OpenSSH) and MD5 (used by AWS EC2 Key Pairs) cryptographic fingerprints. It extracts key bit lengths, comments/emails, and renders visual ASCII drunken bishop randomart.
Core Concepts
Understanding SSH public key fingerprints and inspection:
- Binary Key Parsing: Decodes the Base64 binary payload to determine key algorithm, public exponent, modulus bit length, and elliptic curve parameters.
- SHA256 & MD5 Fingerprints: Computes standard unpadded Base64 SHA256 hashes (
SHA256:...) and colon-delimited MD5 hex digests (MD5:xx:xx:...). - OpenSSH Randomart Visualizer: Implements the official OpenSSH drunken bishop random walk algorithm on a 9x17 character matrix.
How to use the tool?
- Paste OpenSSH Public Key: Paste your public key string (e.g. from
~/.ssh/id_ed25519.pub) or click Load Sample Key. - Generate Fingerprints: Click Generate SSH Fingerprint to calculate hashes and inspect key parameters.
- Copy Fingerprints or Art: Click Copy next to the SHA256 fingerprint, MD5 digest, or visual randomart.
Related Developer Utilities
If you work with SSH keys, authentication, and cryptographic fingerprints, explore these complementary tools:
- SSH Public Key Format Converter: Convert keys between OpenSSH, RFC 4716, and PEM formats.
- SSH Config to Ansible Inventory Converter: Convert
~/.ssh/configto Ansible inventories. - SSH Config to /etc/hosts Converter: Convert SSH config hosts into
/etc/hostsaliases. - AWS IAM OIDC Thumbprint Calculator: Calculate 40-character SHA-1 CA thumbprints for GitHub Actions.
REST API Integration
Blueutils provides a free REST API endpoint (POST https://blueutils.com/api/ssh/ssh-key-fingerprint) to programmatically calculate SHA256 (GitHub/OpenSSH) and MD5 (AWS EC2) fingerprints, parse key algorithms, bit strength, and generate randomart visual graphs.
API Request Parameters
| Name | Type | Description | Example |
|---|---|---|---|
rawText |
String | OpenSSH public key string (e.g. ssh-rsa, ssh-ed25519). |
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5... user@workstation" |
API Request Payload Examples
cURL
curl -X POST https://blueutils.com/api/ssh/ssh-key-fingerprint \
-H "Content-Type: application/json" \
-d '{
"rawText": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGt7X2N+h4l7T5rL6H3n8P9Z1m+2q4w6e8r0t2y4u6i8 developer@workstation"
}'Python
import requests
url = "https://blueutils.com/api/ssh/ssh-key-fingerprint"
payload = {
"rawText": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGt7X2N+h4l7T5rL6H3n8P9Z1m+2q4w6e8r0t2y4u6i8 developer@workstation"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String jsonPayload = """
{
"rawText": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGt7X2N+h4l7T5rL6H3n8P9Z1m+2q4w6e8r0t2y4u6i8 developer@workstation"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://blueutils.com/api/ssh/ssh-key-fingerprint"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}API Response Parameters
| Name | Type | Description | Example |
|---|---|---|---|
isValid |
Boolean | Indicates whether key decoding succeeded. | true |
algorithm |
String | Parsed key algorithm (e.g. ssh-ed25519, ssh-rsa). |
"ssh-ed25519" |
bitLength |
Number | Key bit length (e.g. 256, 2048, 4096). |
256 |
comment |
String | Key comment or email tag. | "developer@workstation" |
sha256Fingerprint |
String | Standard OpenSSH & GitHub Base64 SHA256 fingerprint. | "SHA256:7uK..." |
md5Fingerprint |
String | Legacy & AWS EC2 colon-separated MD5 hex fingerprint. | "MD5:8e:14:..." |
randomart |
String | Visual ASCII host key drunken bishop randomart. | "+--[ED25519 256]--+\n..." |
API Response Payload Examples
Success Response (HTTP 200 OK)
{
"isValid": true,
"algorithm": "ssh-ed25519",
"bitLength": 256,
"comment": "developer@workstation",
"sha256Fingerprint": "SHA256:4t7X7k9M+3w2kL...",
"md5Fingerprint": "MD5:a1:b2:c3:d4:e5:f6:07:18:29:3a:4b:5c:6d:7e:8f:90",
"randomart": "+--[ED25519 256]--+\n| ..+. |\n| . o o. |\n| + + o |\n+-----------------+"
}Validation Failure Response (HTTP 400 Bad Request)
{
"isValid": false,
"error": "Invalid SSH public key: Expected at least 2 tokens (key type and Base64 encoded key payload)."
}Rate Limit Exceeded Response (HTTP 429 Too Many Requests)
{
"error": "API rate limit exceeded. Please wait or contact support@blueutils.com."
}Why use an API to calculate SSH key fingerprints?
Integrating the SSH Key Fingerprint API into cloud provisioning scripts, GitHub Actions workflows, or AI agent tool calling provides key benefits:
- Rapid Script Validation: Verifies that deployed SSH public keys match AWS EC2 Key Pairs or GitHub deploy keys without executing shell binaries.
- Optimized Token Efficiency for AI Agents: LLMs cannot reliably compute binary SHA256 or MD5 hashes from Base64 key blobs. Calling the API extracts fingerprints deterministically without token consumption.
- Deterministic Accuracy Without Hallucinations: Ensures 100% byte-accurate OpenSSH and AWS EC2 fingerprint formats.
Native Usage
How to generate SSH key fingerprints locally in terminal environments or scripts:
Windows (CMD / PowerShell)
:: Generate SHA256 and MD5 fingerprints from local key file in Windows
ssh-keygen -l -f %USERPROFILE%\.ssh\id_ed25519.pub
ssh-keygen -l -E md5 -f %USERPROFILE%\.ssh\id_ed25519.pubLinux / Unix (Bash)
# SHA256 Fingerprint in Linux
ssh-keygen -l -f ~/.ssh/id_rsa.pub
# MD5 Fingerprint in Linux (AWS EC2 format)
ssh-keygen -l -E md5 -f ~/.ssh/id_rsa.pubPython
Using Python:
import base64
import hashlib
def get_ssh_fingerprints(pubkey_str):
parts = pubkey_str.strip().split()
key_bytes = base64.b64decode(parts[1])
sha256 = "SHA256:" + base64.b64encode(hashlib.sha256(key_bytes).digest()).decode('utf-8').rstrip('=')
md5 = "MD5:" + ":".join(f"{b:02x}" for b in hashlib.md5(key_bytes).digest())
return sha256, md5
print(get_ssh_fingerprints("ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGt7X2N+h4l7T5rL6H3n8P9Z1m+2q4w6e8r0t2y4u6i8 user@host"))Java
Using Java:
import java.security.MessageDigest;
import java.util.Base64;
public class SshFingerprintExample {
public static void main(String[] args) throws Exception {
String keyB64 = "AAAAC3NzaC1lZDI1NTE5AAAAIGt7X2N+h4l7T5rL6H3n8P9Z1m+2q4w6e8r0t2y4u6i8";
byte[] keyBytes = Base64.getDecoder().decode(keyB64);
byte[] digest = MessageDigest.getInstance("SHA-256").digest(keyBytes);
String fp = "SHA256:" + Base64.getEncoder().withoutPadding().encodeToString(digest);
System.out.println(fp);
}
}