Socket
Socket
Sign inDemoInstall

ssh-fingerprint

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ssh-fingerprint

Generate a fingerprint given an SSH public key (without `ssh-keygen` or external dependencies)


Version published
Weekly downloads
1.1K
decreased by-41.62%
Maintainers
1
Install size
3.95 kB
Created
Weekly downloads
 

Readme

Source

ssh-fingerprint

Generate a fingerprint given an SSH public key (without ssh-keygen or external dependencies)

Install

npm install ssh-fingerprint

Example

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

FAQs

Last updated on 04 Oct 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc