Shivageeta has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl #use Time::Format; BEGIN { push(@INC,'/usr/lib/perl5/site_perl/5.8.0/URI/'); } require "Telnet.pm"; #Initialise telnet $telnet = new Net::Telnet->new( Timeout=>20,Prompt => '/[\$%#>] $/'); die &Log_Message("Can't open telnet session to the remote host") unles +s $telnet; #Telnet and login to a remote machine $telnet->open("systst-lnx-15"); $telnet->login("root","novell"); print "Logged into the system \n"; #After a successful telnet create the file /my-perl at the remote host +. $telnet->cmd("touch /my-perl"); $telnet->close;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: problem in perl telnet module
by BrentDax (Hermit) on Jan 25, 2005 at 12:05 UTC | |
by Fletch (Bishop) on Jan 25, 2005 at 12:20 UTC | |
Re: problem in perl telnet module
by Anonymous Monk on Jan 25, 2005 at 11:41 UTC | |
Re: problem in perl telnet module
by simon.proctor (Vicar) on Jan 25, 2005 at 12:50 UTC | |
by muntfish (Chaplain) on Jan 25, 2005 at 16:52 UTC | |
Re: problem in perl telnet module
by muntfish (Chaplain) on Jan 25, 2005 at 16:59 UTC | |
Re: problem in perl telnet module
by edan (Curate) on Jan 25, 2005 at 12:00 UTC |