Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 07-26-2005, 01:59 AM   #1
LQ Newbie
Registered: Jul 2005
Location: france
Posts: 1

Rep: Reputation: 0
How is it possible to login as root with Perl script and used


I write a perl script under UNIX/LINUX.
The aim of this script is to open a telnet session as ROOT.
To do this, I use the library under perl.
Following is my source code :


use Net::Telnet;
my $fh1,$fh2,$fh3;
$telnet = new Net::Telnet ( Timeout=>10, Errmode=>'die', Prompt=>'/\$ $/i');
$fh1 = $telnet->option_log("optionlog.txt");
$fh2 = $telnet->input_log("inputlog.txt");
$fh3 = $telnet->output_log("outputlog.txt");
$telnet->login('root', '');
print $telnet->cmd('ls');

When I run this script, I have the following message :

timed-out waiting for password prompt at

But when I want to open a telnet session and login as root any password is needed !!!!

I don't understand what is happened ?

Can someone tell me how it is possible do this with under perl script ?

Best regards, @+, Manu
Old 07-27-2005, 05:22 PM   #2
Registered: Jul 2004
Location: United Kingdom
Distribution: Fedora Core 9
Posts: 141

Rep: Reputation: 15
I don't think you can login as root under telnet. You can using ssh as that is more secure but with telnet there is little in the way of security.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't login with TELNET for ROOT sjcollier Linux - Newbie 5 08-17-2003 03:07 PM
Telnet login as root macone Linux - Security 7 11-13-2002 05:39 AM
telnet login via shell script lethe Linux - General 8 05-13-2002 09:31 AM
Login thru telnet as root uprichard Linux - Security 11 05-09-2002 12:12 PM
Root login to telnet sarmadys Linux - Security 6 01-24-2002 01:09 PM

All times are GMT -5. The time now is 04:31 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration