ssh - v0.1.0
    Preparing search index...

    ssh - v0.1.0

    @li0ard/ssh
    SSH keys toolkit
    docs




    # from NPM
    npm i @li0ard/ssh

    # from JSR
    bunx jsr i @li0ard/ssh
    • Provides simple and modern API
    • Most of the APIs are strictly typed
    • Supports Bun, Node.js, Deno, Browsers
    • Works with ED25519 and ECDSA keys (including password-encrypted keys)
    • Supports conversion to Age format
    import { PrivateKey, PublicKey } from "@li0ard/ssh";

    const privateKey = PrivateKey.parse("-----BEGIN OPENSSH PRIVATE KEY...", "yourcoolpasshprase");
    const publicKey = PublicKey.parse("ssh-ed25519...");

    const data = new Uint8Array([0xAA, 0xBB, 0xCC, 0xDD]);
    const signature = privateKey.sign(data);

    console.log(signature); // -> Uint8Array [...]
    console.log(publicKey.verify(data, signature)); // -> true