1.2.0 • Published 8 months ago

ssh-rsa-keygen v1.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

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