On Monday, August 12, 2002, at 09:48 , Joe Mecklin wrote:
> I had not tried that because login() requires "login:" or "username:" as > the prompt (as I read the documentation); my prompt is "User ID:". I > did go ahead and try it just now and it doesn't work either... doesn't > even send out the username since it doesn't see the expected prompt. [..] in the main you have built the right approach here: > > if ($ion->waitfor(-string => "User ID:")) > { > print "Saw \"User ID:\" ...\n"; > $ion->print("username"); > } > > if ($ion->waitfor(-string => "Password:")) > { > print "Saw \"Password:\" ...\n"; > } when you see that, did you think about if ($ion->waitfor(-string => "Password:")) { print "Saw \"Password:\" ...\n"; $ion->print("$the_passwd"); } so that you can 'login'.... just as you would do when you do a telnet to that host.... if one does merely: [jeeves:~] drieux% telnet xanana Trying 199.108.16.32... Connected to xanana. Escape character is '^]'. Red Hat Linux release 7.3 (Valhalla) Kernel 2.4.18-5smp on an i686 login: drieux Password: Login timed out after 60 seconds Connection closed by foreign host. [jeeves:~] drieux% it does that because I never send it a Password when prompted to do so.... [jeeves:~] drieux% !! telnet xanana Trying 199.108.16.32... Connected to xanana. Escape character is '^]'. Red Hat Linux release 7.3 (Valhalla) Kernel 2.4.18-5smp on an i686 login: drieux Password: Last login: Mon Aug 12 10:09:12 from jeeves xanana: 51:] same sequence, except that I actually typed in the password when prompted.... ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]