Server IP : 85.214.239.14 / Your IP : 3.147.82.108 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/3/root/usr/share/augeas/lenses/dist/ |
Upload File : |
(* Module: Known_Hosts Parses SSH known_hosts files Author: Raphaël Pinson <raphink@gmail.com> About: Reference This lens manages OpenSSH's known_hosts files. See `man 8 sshd` for reference. 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: 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. Only one marker should be used on a key line. *) let marker = [ key /@(revoked|cert-authority)/ . Sep.space ] (* View: 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. The optional comment field continues to the end of the line, and is not used. *) let type = [ label "type" . store Rx.neg1 ] (* View: entry 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 ] (* 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