SSH Key Generator

Generate SSH Keys Online

SSH-Keygen Online Algorithm RSA DSA ECDSA RSA Key Size 1024 2048 4096
We don't store any keys you generate on this page

Your Support Matters!

Buy me a coffee to play a crucial role in advancing this project.
Your contribution is indispensable! I'm genuinely grateful for your support ❤

SSH-Keygen Helpers

Generate an RSA SSH keypair with a 4096 bit private keyssh-keygen -t rsa -b 4096 -C "RSA 4096 bit Keys"Generate an DSA SSH keypair with a 2048 bit private keyssh-keygen -t dsa -b 1024 -C "DSA 1024 bit Keys"Generate an ECDSA SSH keypair with a 521 bit private keyssh-keygen -t ecdsa -b 521 -C "ECDSA 521 bit Keys"Generate an ed25519 SSH keypair- this is a new algorithm added in OpenSSH.ssh-keygen -t ed25519Extracting the public key from an RSA keypairopenssl rsa -pubout -in private_key.pem -out public_key.pemExtracting the public key from an DSA keypairopenssl dsa -pubout -in private_key.pem -out public_key.pem
Copy the public key to the server
The ssh-copy-id command
ssh-copy-id user@hostname copies the public key of your default identity (use -i identity_file for other identities) to the remote host
SSH Running on different port
ssh-copy-id -i "user@hostname -p2222"
-i switch defaults to ~/.ssh/id_rsa.pub, if you want another key, put the path of the key after
Converting keys between openssl and openssh
Extract Public key from the certificate
openssl x509 -in cert.pem -noout -pubkey >pubkey.pem cat pubkey.pem -----BEGIN PUBLIC KEY----- MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0TqlveKKlc2MFvEmuXJi LGBsY1t4ML4uiRADGSZlnc+7Ugv3h+MCjkkwOKiOdsNo8k4KSBIG5GcQfKYOOd17 AJvqCL6cGQbaLuqv0a64jeDm8oO8/xN/IM0oKw7rMr/2oAJOgIsfeXPkRxWWic9A VIS++H5Qi2r7bUFX+cqFsyUCAwEAAQ== -----END PUBLIC KEY-----
Use the following command to convert it to authorized_keys entry
$ ssh-keygen -i -m PKCS8 -f pubkey.pem ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDROqW94oqVzYwW8Sa5cmIsYGxjW3gwvi6JEAMZJmWdz7tSC/eH4wKOSTA4qI52w2jyTgpIEgbkZxB8pg453XvbngfjPMhhAV0XSy3s1wUFGPWlumctOvaowxXf60y7h5zsDTSTHzO5d2agAk6Aix95c+RHFZaJz0BUhL74flCLavttQVf5yoWzJQ==