fingerprint: OpenSSH fingerprint

Description Usage Arguments Examples

View source: R/openssh.R

Description

Calculates the OpenSSH fingerprint of a public key. This value should match what you get to see when connecting with SSH to a server. Note that some other systems might use a different algorithm to derive a (different) fingerprint for the same keypair.

Usage

1
fingerprint(key, hashfun = md5)

Arguments

key

a public or private key

hashfun

which hash function to use to calculate the fingerprint

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
mykey <- rsa_keygen()
pubkey <- as.list(mykey)$pubkey
fingerprint(mykey)
fingerprint(pubkey)

# Some systems use other hash functions
fingerprint(pubkey, sha1)
fingerprint(pubkey, sha256)

# Other key types
fingerprint(dsa_keygen())

Example output

Linking to: OpenSSL 1.1.1f  31 Mar 2020
md5 7e:3a:27:c2:36:c2:86:2c:35:0c:bd:a0:83:14:36:50 
md5 7e:3a:27:c2:36:c2:86:2c:35:0c:bd:a0:83:14:36:50 
sha1 f9:9f:9c:13:bd:83:a2:a7:aa:93:02:cf:07:07:7d:6d:ce:bb:56:e9 
sha256 82:49:49:c7:34:99:6a:ac:b6:01:53:d8:db:22:9f:71:1e:e2:60:57:02:53:9f:84:7f:e9:dc:f5:66:95:6e:c0 
md5 28:4e:25:c7:05:44:da:bd:b3:c4:09:d9:2f:b4:c7:3c 

openssl documentation built on Sept. 5, 2021, 5:24 p.m.