Parses /etc/ssh/sshd_config
Author: David Lutterkort lut@redha t.com Dominique Dumont terdominiqu@hp. com e.dumont
Sshd | Parses /etc/ssh/sshd_config |
Reference | sshd_config man page. |
License | This file is licensed under the LGPL v2+. |
Lens Usage | |
CAVEATS | In sshd_config, Match blocks must be located at the end of the file. |
Configuration files | This lens applies to /etc/ssh/sshd_config |
sshd_config man page. See http://www.openbsd.org
print /files/etc/ssh/sshd_config
...
set /files/etc/ssh/sshd_config/X11Forwarding "no"
set /files/etc/ssh/sshd_config/Match[1]/Condition/User "foo" set /files/etc/ssh/sshd_config/Match[1]/Settings/X11Forwarding "yes"
save
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"