Skip to content

Conversation

@misogihagi
Copy link

#21
and merged #13

@micalevisk
Copy link

I've added this feature in my fork: https://www.npmjs.com/package/@micalevisk/ssh-keygen

You just need to supress the second parameter to make it return a Promise instead.

async function runPromiseVersion() {
  try {
    const out = await keygen({
      comment: '[email protected]',
      read: true,
    });

    console.log('Done generating key pairs');
    console.log(out.key);
    console.log(out.pubKey);
  } catch (err) {
    console.log('There was a problem:', err);
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants