ssh-rsa-keygen

1.2.0 • Public • Published

SSH RSA Keygen for EC2

SSH RSA Keygen for EC2 is a Node.js library that simplifies the generation of SSH key pairs suitable for use with Amazon EC2 instances.

Installation

To install the package, use npm:

npm install ssh-rsa-keygen

Usage

This library provides a function to generate SSH key pairs for EC2 instances. Here's an example of how to use it:

const { generateSSH } = require('ssh-rsa-keygen');

generateSSH('my-ec2-key').then((keys) => {
  console.log('Public Key:', keys.publicKey);
  console.log('Private Key:', keys.privateKey);
}).catch((error) => {
  console.error('Error:', error);
});

API Reference

generateSSH(keyName)

Generate SSH key pairs for Amazon EC2 instances.

  • keyName (string): The base name for the key files (without extension).

Example:

generateSSH('my-ec2-key').then((keys) => {
  // Use the generated keys for Amazon EC2
}).catch((error) => {
  console.error('Error:', error);
});

Troubleshooting

  • If you encounter issues, ensure that you have the necessary permissions to write files to the specified directory.
  • Make sure you have Node.js and npm installed.

License

This project is licensed under the MIT License.

Changelog

  • 1.0.0 (2023-08-29)
    • Initial release

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i ssh-rsa-keygen

      Weekly Downloads

      2

      Version

      1.2.0

      License

      MIT

      Unpacked Size

      3.51 kB

      Total Files

      3

      Last publish

      Collaborators

      • abhijeet_voipxp