Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   Telnet module doesnot return the prompt back (http://www.velocityreviews.com/forums/t885812-telnet-module-doesnot-return-the-prompt-back.html)

nilendud@rediffmail.com 04-08-2004 05:32 AM

Telnet module doesnot return the prompt back
 
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

Gregory Toomey 04-08-2004 06:19 AM

Re: Telnet module doesnot return the prompt back
 
nilendud@rediffmail.com 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


All times are GMT. The time now is 12:55 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.