[augeas-devel] augeas: master - Sshd: add documentation on usage
David Lutterkort
lutter at fedoraproject.org
Mon Jan 26 23:03:07 UTC 2009
Gitweb: http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=d6a829e8ff2a27c5c44cc2fee654a4304c5c6394
Commit: d6a829e8ff2a27c5c44cc2fee654a4304c5c6394
Parent: e4a2ff01bef53baec01c825c46518a8ed8409882
Author: Dominique Dumont <dominique.dumont at hp.com>
AuthorDate: Mon Jan 26 14:39:05 2009 -0800
Committer: David Lutterkort <lutter at redhat.com>
CommitterDate: Mon Jan 26 14:39:05 2009 -0800
Sshd: add documentation on usage
---
doc/naturaldocs/conf/lenses/Menu.txt | 1 +
lenses/sshd.aug | 66 +++++++++++++++++++++++++++++++++-
2 files changed, 66 insertions(+), 1 deletions(-)
diff --git a/doc/naturaldocs/conf/lenses/Menu.txt b/doc/naturaldocs/conf/lenses/Menu.txt
index dd810f3..08c1392 100644
--- a/doc/naturaldocs/conf/lenses/Menu.txt
+++ b/doc/naturaldocs/conf/lenses/Menu.txt
@@ -55,6 +55,7 @@ Group: Specific Modules {
File: Dpkg (dpkg.aug)
File: Exports (exports.aug)
+ File: Sshd (sshd.aug)
File: Sudoers (sudoers.aug)
File: Xinetd (xinetd.aug)
} # Group: Specific Modules
diff --git a/lenses/sshd.aug b/lenses/sshd.aug
index e908534..8659dfa 100644
--- a/lenses/sshd.aug
+++ b/lenses/sshd.aug
@@ -1,4 +1,68 @@
-(* /etc/sshd/sshd_config *)
+(*
+Module: Sshd
+ Parses /etc/ssh/sshd_config
+
+Author: David Lutterkort lutter at redhat.com
+ Dominique Dumont dominique.dumont at hp.com
+
+About: Reference
+ sshd_config man page.
+ See http://www.openbsd.org/cgi-bin/man.cgi?query=sshd_config&sektion=5
+
+About: License
+ This file is licensed under the LGPL v2+.
+
+About: Lens Usage
+ Sample usage of this lens in augtool:
+
+ * Get your current setup
+ > print /files/etc/ssh/sshd_config
+ ...
+
+ * Set X11Forwarding to "no"
+ > set /files/etc/ssh/sshd_config/X11Forwarding "no"
+
+ More advanced usage:
+
+ * Set a Match section
+ > set /files/etc/ssh/sshd_config/Match[1]/Condition/User "foo"
+ > set /files/etc/ssh/sshd_config/Match[1]/Settings/X11Forwarding "yes"
+
+ Saving your file:
+
+ > save
+
+
+About: CAVEATS
+
+ In sshd_config, Match blocks must be located at the end of the file.
+ This means that any new "global" parameters (i.e. outside of a Match
+ block) must be written before the first Match block. By default,
+ Augeas will write new parameters at the end of the file.
+
+ I.e. if you have a Match section and no ChrootDirectory parameter,
+ this command:
+
+ > set /files/etc/ssh/sshd_config/ChrootDirectory "foo"
+
+ will be stored in a new node after the Match section and Augeas will
+ refuse to save sshd_config file.
+
+ To create a new parameter as the right place, you must first create
+ a new Augeas node before the Match section:
+
+ > ins ChrootDirectory before /files/etc/ssh/sshd_config/Match
+
+ Then, you can set the parameter
+
+ > set /files/etc/ssh/sshd_config/ChrootDirectory "foo"
+
+
+About: Configuration files
+ This lens applies to /etc/ssh/sshd_config
+
+*)
+
module Sshd =
autoload xfm
More information about the augeas-devel
mailing list