Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Telnet module doesnot return the prompt back

Reply
Thread Tools

Telnet module doesnot return the prompt back

 
 
nilendud@rediffmail.com
Guest
Posts: n/a
 
      04-08-2004
Hello,

I have a problem. I need to run some commands as superuser on a
remote machine.
I am using net::Telnet to login to the remote machine when i type
$telnet->cmd("su - root"); the prompt ( I guess) waits for me to type
the password on the remote machine and control never comes back

Is there any work around? any otehr module that could help...
i thought about sudo but that too need password for the first time.

Please suggest

Nilendu
 
Reply With Quote
 
 
 
 
Gregory Toomey
Guest
Posts: n/a
 
      04-08-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> Hello,
>
> I have a problem. I need to run some commands as superuser on a
> remote machine.
> I am using net::Telnet to login to the remote machine when i type
> $telnet->cmd("su - root"); the prompt ( I guess) waits for me to type
> the password on the remote machine and control never comes back
>
> Is there any work around? any otehr module that could help...
> i thought about sudo but that too need password for the first time.
>
> Please suggest
>
> Nilendu


I use expect (1) for this sort of thing. And use ssh instead of telnet.

gtoomey
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
prompt to save on exit - disable prompt on save button Mel ASP .Net 10 02-13-2009 05:32 AM
How to open a shell prompt from an existing shell prompt gaurav kashyap Python 3 10-31-2008 04:41 AM
How to open a shell prompt from an existing shell prompt gaurav kashyap Python 2 10-30-2008 09:18 AM
Telnet - attempting to initiate a telnet session within an established telnet session Carcarius Ruby 0 12-06-2007 03:26 AM
NET::Telnet prompt regular expression Pete Johansen Perl 0 05-05-2004 01:44 PM



Advertisments