@cfxlabsinc/b2b-services
    Preparing search index...

    An ssh2 agent that signs the SSH handshake with an Ed25519 KMS key, so a private key never has to exist in the process, in SSM, or in Secrets Manager.

    KMS's ED25519_SHA_512 with MessageType: RAW is pure Ed25519 over the message, which is exactly what ssh-ed25519 signs. So the 64 bytes KMS returns are the signature ssh2 wants verbatim: authPK wraps it into the SSH blob itself, and convertSignature rewrites only ssh-dss and ecdsa-*. Nothing has to be transcoded here.

    Ed25519 has exactly one signing algorithm, so unlike the RSA path there is no rsa-sha2-* negotiation to mirror between what ssh2 offers and what we sign with.

    Hierarchy

    • BaseAgent<ParsedKey>
      • KmsSshAgent
    Index
    • Optional method that may be implemented to support agent forwarding. Callback should be invoked with a Duplex stream to be used to communicate with your agent/ You will probably want to utilize AgentProtocol as agent forwarding is an OpenSSH feature, so the stream needs to be able to transmit/receive OpenSSH agent protocol packets.

      Parameters

      • cb: GetStreamCallback

      Returns void

    • Signs the datawith the given public key, and calls back with its signature. Note that, in the current implementation, "options" is always an empty object.

      Parameters

      • _pubKey: ParsedKey
      • data: Buffer
      • optionsOrCb: unknown
      • OptionalmaybeCb: (err: Error | null, signature?: Buffer<ArrayBufferLike>) => void

      Returns void