xref: /freebsd/contrib/file/magic/Magdir/ssh (revision f5463265955b829775bbb32e1fd0bc11dafc36ce)
1# Type:	OpenSSH key files
2# From:	Nicolas Collignon <tsointsoin@gmail.com>
3
40	string	SSH\040PRIVATE\040KEY	OpenSSH RSA1 private key,
5>28	string	>\0			version %s
60	string	-----BEGIN\040OPENSSH\040PRIVATE\040KEY-----	OpenSSH private key
7# https://www.rfc-editor.org/rfc/rfc5958
80	string	-----BEGIN\040PRIVATE\040KEY-----	OpenSSH private key (no password)
90	string	-----BEGIN\040ENCRYPTED\040PRIVATE\040KEY-----	OpenSSH private key (with password)
10
110	string	ssh-dss\040		OpenSSH DSA public key
120	string	ssh-rsa\040		OpenSSH RSA public key
130	string	ecdsa-sha2-nistp256	OpenSSH ECDSA public key
140	string	ecdsa-sha2-nistp384	OpenSSH ECDSA public key
150	string	ecdsa-sha2-nistp521	OpenSSH ECDSA public key
160	string	ssh-ed25519		OpenSSH ED25519 public key
17
180	string	SSHKRL\n\0
19>8	ubelong	1		OpenSSH key/certificate revocation list, format %u
20>>12	ubequad	x		\b, version %llx
21>>>20	beqdate	x		\b, generated %s
22
23# From:		Joerg Jenderek
24# URL:		https://en.wikipedia.org/wiki/PuTTY
25# Reference:	https://the.earth.li/~sgtatham/putty/latest/putty-0.73.tar.gz
26#		/sshpubk.c
270	string		PuTTY-User-Key-File-	PuTTY Private Key File
28#!:mime	text/plain
29# https://github.com/github/putty/blob/master/windows/installer.wxs
30!:mime	application/x-putty-private-key
31!:ext	ppk
32# version 1 or 2
33>20	string		x			\b, version %.1s
34# name of the algorithm like: ssh-dss ssh-rsa ecdsa-sha2-nistp256 ssh-ed25519
35>23	string		x			\b, algorithm %s
36# next line says "Encryption: " plus an encryption type like aes256-cbc or none
37>32	search/13	Encryption:\040		\b, Encryption
38>>&0	string		x			%s
39# next line says "Comment: " plus the comment string
40>>>&0	search/3	Comment:\040
41>>>>&0	string		x			"%s"
42
43