ssh key management widget
Last updated 8 years ago by pkrumins .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install ssh-key-widget 
SYNC missed versions from official npm registry.

SSH Key Widget

An ssh key widget. Add new keys or list and delete existing keys.


var sshWidget = require('ssh-key-widget');
var sshWidget = sshWidget();

sshWidget.on('newKey', function (key) {
  console.log('user submitted a new key: ' + key);
  sshWidget.emit('addKeyToList', key);

In this example when a user submits a new key, the widget emits newKey event. We just log this to console and emit it back to ssh widget via addKeyToList event so it was added to the list of existing keys. Similarly by using addKeyToList you can submit all other user keys to the list.

Todo: deleting keys.


var sshWidget = sshWidget()

Return a new ssh widget instance.


Append the ssh widget to the dom element or query selector string target.


keyboard.on('newKey', function (key) { })

Ssh widget emits the newKey events when you add a new key. The callback receives key parameter which is the key the user pasted in the textarea.

keyboard.emit('addKeyToList', key);

Ssh widget listens for addKeyToList events so you can update the list of all the user's ssh keys.

Todo: deleting keys.


With npm do:

npm install ssh-key-widget

Use browserify to require('ssh-key-widget').



Current Tags

  • 0.0.1                                ...           latest (8 years ago)

1 Versions

  • 0.0.1                                ...           8 years ago
Maintainers (1)
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 1
Dependencies (2)
Dev Dependencies (0)
Dependents (0)

Copyright 2014 - 2017 © |