Telnet module doesnot return the prompt back

N

nilendud

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
 
G

Gregory Toomey

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top