I have no familiarity with the Net::Telnet module, but I believe the SU
syntax is
actually 'SU -' to open a shell that you can log into.

TW

On Wed, 11 Apr 2001, John Williams wrote:

> I've had success with the Net::Telnet module.  But I can't get the SU
> command to work.  It times out waiting for a password.
>
> Any ideas?
>
> Thanks!
>
> John
>
> ---CODE----
> #! perl remote login
> use Net::Telnet ();
> $telnet = new Net::Telnet (Timeout => 5);
>
> $telnet->open("192.134.1.23");
> $telnet->login($user, $pw);
>
> $telnet->cmd("su");
>
> #it never seems to get to this point
> $telnet->waitfor('/Password: /');
> $telnet->print("the password");
>
>
>
>

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to