Parses SSH known_hosts files
Author: Raphaël Pinson rap@gmai l.com hink
Known_Hosts | Parses SSH known_hosts files |
Reference | This lens manages OpenSSH’s known_hosts files. |
License | This file is licenced under the LGPL v2+, like the rest of Augeas. |
Lens Usage | |
Configuration files | This lens applies to SSH known_hosts files. |
Augeas Lenses | |
marker | The marker is optional, but if it is present then it must be one of â@cert-authorityâ, to indicate that the line contains a certification authority (CA) key, or â@revokedâ, to indicate that the key contained on the line is revoked and must not ever be accepted. |
type | Bits, exponent, and modulus are taken directly from the RSA host key; they can be obtained, for example, from /etc/ssh/ssh_host_key.pub. |
entry | A known_hosts entry |
lns | The known_hosts lens |
Augeas Variables | |
filter |
This lens applies to SSH known_hosts files. See filter.
let marker = [ key /@(revoked|cert-authority)/ . Sep.space ]
The marker is optional, but if it is present then it must be one of â@cert-authorityâ, to indicate that the line contains a certification authority (CA) key, or â@revokedâ, to indicate that the key contained on the line is revoked and must not ever be accepted. Only one marker should be used on a key line.
The marker is optional, but if it is present then it must be one of â@cert-authorityâ, to indicate that the line contains a certification authority (CA) key, or â@revokedâ, to indicate that the key contained on the line is revoked and must not ever be accepted.
let marker = [ key /@(revoked|cert-authority)/ . Sep.space ]
Bits, exponent, and modulus are taken directly from the RSA host key; they can be obtained, for example, from /etc/ssh/ssh_host_key.pub.
let type = [ label "type" . store Rx.neg1 ]
A known_hosts entry
let entry = let alias = [ label "alias" . store Rx.neg1 ] in let key = [ label "key" . store Rx.neg1 ] in [ Util.indent . seq "entry" . marker? . store Rx.neg1 . (Sep.comma . Build.opt_list alias Sep.comma)? . Sep.space . type . Sep.space . key . Util.comment_or_eol ]
The known_hosts lens
let lns = (Util.empty | Util.comment | entry)*