(*
Module: Authorized_Keys
Parses SSH authorized_keys
Author: Raphael Pinson
About: Reference
This lens tries to keep as close as possible to `man 5 authorized_keys` where possible.
About: License
This file is licenced under the LGPL v2+, like the rest of Augeas.
About: Lens Usage
To be documented
About: Configuration files
This lens applies to SSH authorized_keys. See .
About: Examples
The file contains various examples and tests.
*)
module Authorized_Keys =
autoload xfm
(* View: option
A key option *)
let option =
let kv_re = "command" | "environment" | "from"
| "permitopen" | "principals" | "tunnel"
in let flag_re = "cert-authority" | "no-agent-forwarding"
| "no-port-forwarding" | "no-pty" | "no-user-rc"
| "no-X11-forwarding"
in let option_value = Util.del_str "\"" . store /[^\n"]+/ . Util.del_str "\""
in Build.key_value kv_re Sep.equal option_value
| Build.flag flag_re
(* View: key_options
A list of key