Known_Hosts

Parses SSH known_hosts files

Author: Raphaël Pinson rap.nosp@m.hink@gmai.nosp@m.l.com

Summary
Known_HostsParses SSH known_hosts files
ReferenceThis lens ensures that conf files included in ActiveMQ /FuseMQ are properly handled by Augeas.
LicenseThis file is licenced under the LGPL v2+, like the rest of Augeas.
Lens Usage
Configuration filesThis lens applies to SSH known_hosts files.
Augeas Lenses
entryA known_hosts entry
lnsThe known_hosts lens
Augeas Variables
filter

Reference

This lens ensures that conf files included in ActiveMQ /FuseMQ are properly handled by Augeas.

License

This file is licenced under the LGPL v2+, like the rest of Augeas.

Lens Usage

Sample usage of this lens in augtool

  • Get a key by name from ssh_known_hosts
print /files/etc/ssh_known_hosts/*[.="foo.example.com"]

...

  • Change a host’s key
set /files/etc/ssh_known_hosts/*[.="foo.example.com"]/key "newkey"

Configuration files

This lens applies to SSH known_hosts files.  See filter.

Augeas Lenses

entry

let entry = let alias = [ label "alias" . store Rx.neg1 ] in [ Util.indent . seq "entry" . store Rx.neg1 . (Sep.comma . Build.opt_list alias Sep.comma)? . Sep.space . [ label "type" . store Rx.no_spaces ] . Sep.space . [ label "key" . store Rx.no_spaces ] . Util.eol ]

A known_hosts entry

lns

let lns = (Util.empty | Util.comment | entry)*

The known_hosts lens

Augeas Variables

filter

let entry = let alias = [ label "alias" . store Rx.neg1 ] in [ Util.indent . seq "entry" . store Rx.neg1 . (Sep.comma . Build.opt_list alias Sep.comma)? . Sep.space . [ label "type" . store Rx.no_spaces ] . Sep.space . [ label "key" . store Rx.no_spaces ] . Util.eol ]
A known_hosts entry
let lns = (Util.empty | Util.comment | entry)*
The known_hosts lens
Close