charmbracelet/keygen

An SSH key pair generator 🗝️

Go

173

77 commits

updated Aug 14, 2026

See the code

README

Keygen

Latest Release GoDoc Build Status Go ReportCard

An SSH key pair generator with password protected keys support. Supports generating RSA, ECDSA, and Ed25519 keys.

Example

kp, err := keygen.New(
    "awesome",
    keygen.WithPassphrase("awesome_secret"),
    keygen.WithKeyType(keygen.Ed25519),
)
if err != nil {
    log.Fatalf("error creating SSH key pair: %v", err)
}
fmt.Printf("Your authorized key: %s\n", kp.AuthorizedKey())

Contributing

See contributing.

Feedback

We’d love to hear your thoughts on this project. Feel free to drop us a note!

License

MIT


Part of Charm.

The Charm logo

Charm热爱开源 • Charm loves open source

Significant stargazers

Nicolas M.

196 followers · starred Sep 2021

charmbracelet/keygen

An SSH key pair generator 🗝️

Go

173

77 commits

updated Aug 14, 2026

See the code

README

Keygen

Latest Release GoDoc Build Status Go ReportCard

An SSH key pair generator with password protected keys support. Supports generating RSA, ECDSA, and Ed25519 keys.

Example

kp, err := keygen.New(
    "awesome",
    keygen.WithPassphrase("awesome_secret"),
    keygen.WithKeyType(keygen.Ed25519),
)
if err != nil {
    log.Fatalf("error creating SSH key pair: %v", err)
}
fmt.Printf("Your authorized key: %s\n", kp.AuthorizedKey())

Contributing

See contributing.

Feedback

We’d love to hear your thoughts on this project. Feel free to drop us a note!

License

MIT


Part of Charm.

The Charm logo

Charm热爱开源 • Charm loves open source

Significant stargazers

Nicolas M.

196 followers · starred Sep 2021