HEX
Server: Apache
System: Linux vpshost0650.publiccloud.com.br 4.4.79-grsec-1.lc.x86_64 #1 SMP Wed Aug 2 14:18:21 -03 2017 x86_64
User: bandeirantesbomb3 (10068)
PHP: 8.0.7
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //proc/self/root/proc/thread-self/root/proc/self/root/usr/share/augeas/lenses/dist/known_hosts.aug
(*
Module: Known_Hosts
  Parses SSH known_hosts files

Author: Raphaƫl Pinson <raphink@gmail.com>

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

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

About: 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"

About: Configuration files
  This lens applies to SSH known_hosts files. See <filter>.

*)

module Known_Hosts =

autoload xfm

(* View: entry
     A known_hosts 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 ]

(* View: lns
     The known_hosts lens *)
let lns = (Util.empty | Util.comment | entry)*

(* Variable: filter *)
let filter = incl "/etc/ssh/ssh_known_hosts"
           . incl (Sys.getenv("HOME") . "/.ssh/known_hosts")

let xfm = transform lns filter