mkkey

0.4.2 • Public • Published

mkkey

mkkey makes ssh keys!

Installation

$ npm install -g mkkey

Usage

$ mkkey test

Output

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5Ln8cFLFxZ+dNLXiBpyjTIiEVujZ5SGkVQnMj6d8USfY11zR3CqOP/AxQgX/kJs4Kb9y7EGOcdBvsXsxfW/z67IIPxn7881KNO1nbZYaUDP+5Ll6nM+ovpGh4LJb0/vYo+UHii8JGoiTZe1VGGgnyoEbjpDfSyDzPqtdE7rGKIf3/YYt98b0edljtYperBhvOVHtl2MwwU+0+Oq1l2vEvYLJ0h/zdBN/eQ9JP4IkzzhriabQOnrZE9lLMGoRwM3Rjl9TPVnhsoYnOeOTKVrlJoKXVmHkCDo9frhB4Oxn75q3h4x+jf1sfZ86MxyUhLK1z6/z7/Tc7Z+T0fqu5RAn7

What just happened?

  1. If ~/.ssh doesn't exist, it will be created
  2. test.pem private key was created
  3. The openssh-compatible public key was extracted from the private key and printed to stdout
  4. All permissions were properly set for the directory and the key

Namespaces

I like having a separate key for each user on each host, but putting all of those keys in ~/.ssh becomes unruly over time.

  • What if you have multiple keys to manage for a single host?
  • What if your usernames are used on multiple hosts?

Problem solved.

$ mkkey example.com/foo
...
$ mkkey example.com/bar
...

What just happened?

Everything is the same as above, except if a directory is specified, it will automatically be created for you.

  1. ~/ssh/example.com/foo.pem was created
  2. ~/ssh/example.com/bar.pem was created
  3. All permissions were properly set

Author

duchess code@donut.club

License

BSD 3-clause

Readme

Keywords

Package Sidebar

Install

npm i mkkey

Weekly Downloads

1

Version

0.4.2

License

BSD 3-clause

Last publish

Collaborators

  • duchess