No description, website, or topics provided.
JavaScript Emacs Lisp
Switch branches/tags
Nothing to show
Latest commit 7c82dd3 Mar 26, 2016 @dominictarr 0.11.1
Permalink
Failed to load latest commit information.
test added reverse function for pem => ssh-rsa Mar 10, 2014
.dir-locals.el Update to JEG Nov 5, 2012
.gitignore Initial Creation Jul 14, 2011
.gitmodules Update to JEG Nov 5, 2012
.npmignore add .npmignore May 7, 2013
LICENSE
README.md deprecation notice Mar 26, 2016
index.js added reverse function for pem => ssh-rsa Mar 10, 2014
package.json 0.11.1 Mar 26, 2016

README.md

ssh-key-to-pem

convert an ssh key to PEM format.

deprecated! use sshpk instead!

Usage

read a ssh key and convert it to PEM format.

var fs = require('fs');
var sshKeyToPEM = require('ssh-key-to-pem');

var sshKey = fs.readFileSync('./id_rsa.pub', 'ascii')
var key = sshKeyToPEM(sshKey);

console.log(key)

Alternatively, convert a PEM format public key into an ssh-rsa key

var fs = require('fs');
var pemToRsaSSHKey = require('ssh-key-to-pem').pemToRsaSSHKey;

var key = fs.readFileSync('./pub_key.pem', 'ascii')
var sshKey = pemToRsaSSHKey(key);

console.log(sshKey)

Installation

npm install ssh-key-to-pem

License

MIT.