Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bahamas10/node-ssh-fingerprint
Generate a fingerprint given an SSH public key (without `ssh-keygen` or external dependencies)
https://github.com/bahamas10/node-ssh-fingerprint
Last synced: about 2 months ago
JSON representation
Generate a fingerprint given an SSH public key (without `ssh-keygen` or external dependencies)
- Host: GitHub
- URL: https://github.com/bahamas10/node-ssh-fingerprint
- Owner: bahamas10
- Created: 2013-06-17T16:28:13.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-17T17:46:21.000Z (over 9 years ago)
- Last Synced: 2024-10-06T17:48:12.692Z (3 months ago)
- Language: JavaScript
- Size: 216 KB
- Stars: 7
- Watchers: 3
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ssh-fingerprint
===============Generate a fingerprint given an SSH public key (without `ssh-keygen` or external dependencies)
Install
-------npm install ssh-fingerprint
Example
-------``` js
var fs = require('fs');var fingerprint = require('ssh-fingerprint');
var publickey = fs.readFileSync('id_rsa.pub', 'utf-8');
console.log('fingerprint => %s', fingerprint(publickey));
```yields
```
fingerprint => 64:c4:c5:c9:7e:91:91:db:e3:35:ca:de:be:84:2e:b0
```Usage
-----### `fingerprint(pubkey, algorithm = 'md5');`
Parameters
- `pubkey`: A public key string, typically read from `id_rsa.pub`
- `algorithm`: Hashing algorithm to use, defaults to `md5` (OpenSSH Standard)Returns
- The stringified fingerprint, same as `ssh-keygen -fl id_rsa.pub`
License
-------MIT