Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hughsk/sshconf-stream
Magic-free streaming SSH config parser/stringifier.
https://github.com/hughsk/sshconf-stream
Last synced: 12 days ago
JSON representation
Magic-free streaming SSH config parser/stringifier.
- Host: GitHub
- URL: https://github.com/hughsk/sshconf-stream
- Owner: hughsk
- License: other
- Created: 2013-02-28T05:29:19.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-09-23T03:22:01.000Z (about 8 years ago)
- Last Synced: 2024-10-17T16:41:27.278Z (22 days ago)
- Language: JavaScript
- Size: 143 KB
- Stars: 6
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# sshconf-stream [![Build Status](https://travis-ci.org/hughsk/sshconf-stream.png?branch=master)](https://travis-ci.org/hughsk/sshconf-stream)
Magic-free streaming SSH config parser/stringifier.
Given this `~/.ssh/config` file:
```
Host raspberry
HostName 192.168.2.54
User pi
```You can get this output:
``` javascript
var ssh = require('sshconf-stream')
, fs = require('fs')fs.createReadStream('/home/hughsk/.ssh/config', 'utf8')
.pipe(ssh.createParseStream())
.on('data', function(host) {
console.log(host.keywords['Host']) // ['raspberry']
console.log(host.keywords['HostName']) // ['192.168.2.54']
console.log(host.keywords['User']) // ['pi']
console.log(host.keywords['LocalForward']) // undefined
})
```