Magic-free streaming SSH config parser/stringifier

npm install sshconf-stream
1 downloads in the last day
7 downloads in the last week
23 downloads in the last month

sshconf-stream Build Status

Magic-free streaming SSH config parser/stringifier.

Given this ~/.ssh/config file:

Host raspberry
  User pi

You can get this output:

var ssh = require('sshconf-stream')
  , fs = require('fs')

fs.createReadStream('/home/hughsk/.ssh/config', 'utf8')
  .on('data', function(host) {
    console.log(host.keywords['Host'])         // ['raspberry']
    console.log(host.keywords['HostName'])     // ['']
    console.log(host.keywords['User'])         // ['pi']
    console.log(host.keywords['LocalForward']) // undefined
npm loves you