NAME

Config::Model::Backend::OpenSsh::sshd - Backend for sshd configuration files

SYNOPSIS

invoke editor

The following will launch a graphical editor (if Config::Model::TkUI is installed):

config-edit -application sshd

command line

This command will add a Match section in ~/.ssh/config:

config-edit -application sshd -ui none \
"Match:0 Condition User=foo - Settings ForwardX11=yes"

programmatic

This code snippet will remove the Host Foo section added above:

use Config::Model ;
use Log::Log4perl qw(:easy) ;
my $model = Config::Model -> new ( ) ;
my $inst = $model->instance (root_class_name => 'sshd');
$inst -> config_root ->load("Match:0 Condition User=foo - Settings ForwardX11=yes") ;
$inst->write_back() ;

DESCRIPTION

This calls provides a backend to read and write sshd client configuration files.

Once this module is installed, user root can edit /etc/ssh/sshd_config with :

# config-edit -application sshd 

user interfaces

As mentioned in config-edit, several user interfaces are available:

  • A graphical interface is proposed by default if Config::Model::TkUI is installed.

  • A Curses interface with option -ui curses if Config::Model::CursesUI is installed.

  • A Shell like interface with option -ui term.

  • A Fuse virtual file system with option -ui fuse -fuse_dir <mountpoint> if Fuse is installed (Linux only)

STOP

The documentation provides on the reader and writer of OpenSsh configuration files. These details are not needed for the basic usages explained above.

Methods

These read/write functions are part of OpenSsh::Sshd read/write backend. They are declared in sshd configuration model and are called back when needed to read the configuration file and write it back.

read (object => <sshd_root>, config_dir => ...)

Read sshd_config in config_dir and load the data in the sshd_root configuration tree.

write (object => <sshd_root>, config_dir => ...)

Write sshd_config in config_dir from the data stored in sshd_root configuration tree.

AUTHOR

Dominique Dumont, (ddumont at cpan dot org)

SEE ALSO

config-edit, Config::Model,