![]() |
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 |
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 08:02 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.