Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

generate-ssh

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generate-ssh

A wrapper around ssh-keygen

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

generate-ssh is a small wrapper around the ssh-keygen tool. It supports proper error handling, doesn't call the callback multiple times (:<) and has some support for locating the ssh-keygen executable on Windows.

generate(opts { additionalPaths, comment, bits }, cb(err, data{ private, public }))

The generate function internally automatically tries to locate the ssh-keygen binary. It searches for the executable in PATH and in some commonly found places on Windows. Alternatively, you can provide the additionalPaths option. It's an array with paths to search in.

You can also provide the comment and bits option, which modify how the ssh-keygen binary is called.

The generated private and public keys are provided to the callback in an object with private and public keys.

locate(searchPaths, cb(err, location))

locate takes an array searchPaths and tries to find the ssh-keygen executable in them. If it does find them, it calls the callback with the final resolved path as the location argument. If it doesn't the callback is called with an error.

Keywords

FAQs

Package last updated on 24 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc