DEV Community

kitwharf
kitwharf

Posted on Originally published at kitwharf.com

Why You Shouldn't Generate SSH Keys on a Remote Server (Plus Ed25519 vs RSA 4096 & Git Commit Signing)

When you are on a locked-down Chromebook, a fresh Windows machine without Git Bash configured, or a corporate laptop without terminal access, searching for an "online SSH key generator" is tempting.

The trap: many online SSH keygen sites run ssh-keygen on their backend server and return the private key over HTTP. That means the remote server's logs, reverse proxy, or operator can capture your -----BEGIN OPENSSH PRIVATE KEY----- block in plaintext.

If you need a quick browser-based generator, it must execute 100% client-side in browser RAM via window.crypto.subtle with zero network requests.


Ed25519 vs. RSA 4096: What Should You Use in 2026?

Algorithm Key Size Public Key Length Best Use Case
Ed25519 256-bit (Edwards curve) ~68 chars Default choice: GitHub, GitLab, modern Linux, Kubernetes, SSH commit signing
RSA 4096 4096-bit ~720 chars Legacy RHEL/CentOS hosts, older appliances, strict enterprise RSA audits
ECDSA P-256 / P-384 256 / 384-bit ~100–140 chars Hardware HSMs, FIPS 140-2 environments

Setting Up ~/.ssh/config & Git SSH Commit Signing

Once you generate and download your key pair locally using KitWharf SSH Key Pair Generator:

1. Fix POSIX Permissions (chmod 600)

OpenSSH refuses to load a private key if other local users can read it (UNPROTECTED PRIVATE KEY FILE!):

mkdir -p ~/.ssh && chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_ed25519
chmod 644 ~/.ssh/id_ed25519.pub
Enter fullscreen mode Exit fullscreen mode

2. Isolate Identities in ~/.ssh/config

Host github.com-work
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_ed25519
  IdentitiesOnly yes
Enter fullscreen mode Exit fullscreen mode

3. Sign Git Commits with Your SSH Key (Git 2.34+)

You no longer need a separate GPG setup to get the "Verified" badge on GitHub:

git config --global gpg.format ssh
git config --global user.signingkey ~/.ssh/id_ed25519.pub
git config --global commit.gpgsign true
Enter fullscreen mode Exit fullscreen mode

Try It Offline (Zero Uploads)

Top comments (0)