NAME
Net::Appliance::Session::Transport::Telnet
SYNOPSIS
$s = Net::Appliance::Session->new(
Host => 'hostname.example',
Transport => 'Telnet',
);
$s->connect(
Name => $username, # required if logging in
Password => $password, # required if logging in
);
DESCRIPTION
This package makes use of the native Telnet support in Net::Telnet, in order to establish a connection to a remote host.
CONFIGURATION
This module hooks into Net::Appliance::Session via its connect()
method. Parameters are supplied to connect()
in a hash of named arguments.
Prerequisites
Before calling connect()
you must have set the Host
key in your Net::Appliance::Session object, either via the named parameter to new()
or the host()
object method inherited from Net::Telnet.
Required Parameters
Name
-
If log-in is enabled (i.e. you have not disabled this via
do_login()
), and the remote host requests a username, then you must supply a username in theName
parameter value. The username will be stored for possible later use bybegin_privileged()
. Password
-
If log-in is enabled (i.e. you have not disabled this via
do_login()
) then you must supply a password in thePassword
parameter value. The password will be stored for possible later use bybegin_privileged()
.
Optional Parameters
Timeout
-
This passes a value through to
open()
in Net::Telnet, to override the default connect timeout value of 10 seconds.$s->connect( Name => $username, Password => $password, Timeout => 30, );
The default operation is to time out after 10 seconds.
AUTHOR
Oliver Gorwits <oliver.gorwits@oucs.ox.ac.uk>
COPYRIGHT & LICENSE
Copyright (c) The University of Oxford 2006. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA