Dominique Dumont > Config-Model-OpenSsh > Config::Model::Backend::OpenSsh::Ssh

Download:
Config-Model-OpenSsh-1.224.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Module Version: 1.224   Source  

NAME ^

Config::Model::Backend::OpenSsh::Ssh - Backend for ssh configuration files

SYNOPSIS ^

invoke editor

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

 config-edit -application ssh

command line

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

 config-edit -application ssh -ui none Host:Foo 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 => 'Ssh');
 $inst -> config_root ->load("Host~Foo") ;
 $inst->write_back() ;

DESCRIPTION ^

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

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

 # config-edit -application ssh 

To edit ~/.ssh/config, run as a normal user:

 # config-edit -application ssh

user interfaces ^

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

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::Ssh read/write backend. They are declared in Ssh configuration model and are called back when needed to read the configuration file and write it back.

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

Read ssh_config in config_dir and load the data in the ssh_root configuration tree.

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

Write ssh_config in config_dir from the data stored in ssh_root configuration tree.

AUTHOR ^

Dominique Dumont, (ddumont at cpan dot org)

SEE ALSO ^

config-edit, Config::Model,

syntax highlighting: