npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@microsoft/dev-tunnels-ssh-keys

v3.12.12

Published

SSH key import/export library for Dev Tunnels

Downloads

289

Readme

Dev Tunnels SSH Keys Library

Enables importing and exporting SSH public and private keys in various formats. Password-protection of private keys is also supported when importing and exporting some formats.

Supported Key Algorithms

  • RSA (2048, 4096)
  • ECDSA (P-256, P-384, P-521)

Supported Key Formats

  • SSH public key - Single line starting with a key algorithm name such as ssh-rsa, followed by base64-encoded key bytes, and an optional comment. Files in this format typically end with .pub.

  • PKCS#1 public or private RSA key - PEM-encoded keys in this format begin with one of the following:
    -----BEGIN RSA PUBLIC KEY-----
    -----BEGIN RSA PRIVATE KEY-----

  • SEC1 private EC key - PEM-encoded keys in this format begin with:
    -----BEGIN EC PRIVATE KEY-----

  • PKCS#8 public or private key - PEM-encoded keys in this format begin with one of the following:
    -----BEGIN PUBLIC KEY-----
    -----BEGIN PRIVATE KEY-----
    -----BEGIN ENCRYPTED PRIVATE KEY-----

  • JSON Web Key (JWK) - Key paramters are formatted as JSON.

Private keys in PKCS#1, SEC1, or PKCS#8 format may be passphrase-protected, meaning the private key is encrypted using an encryption key derived from a passphrase. (The encryption used by the PKCS#1/SEC1 formats is weak and no longer recommended.)

For the key formats that are typically PEM-encoded, the equivalent binary (DER) format is also supported.

Example

Use importKey*, exportPublicKey*, and exportPrivateKey* functions provided by the library to import or export keys. When importing, the key format can be auto-detected in most cases.

// Import my password-protected RSA private key from a file.
const privateKey: KeyPair = importPrivateKeyFile('.ssh/id_rsa', myPassword);

// Use the private key for client public key authentication.
const session: SshClientSession = ...
const credentials: SshClientCredentials = { username, publicKeys: [ privateKey ] };
const result: boolean = await session.authenticate(credentials);

When exporting, you can specify the format, and optionally supply a password for encrypting the key. The default format is PKCS#8 because it has broad support and strong encryption when using password protection.