codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  telnet to a system with username and password using perl  susintha at 11:04 on Tuesday, July 10, 2007
 

I tried the following code.
But the output of who command is not shown.

use Net::Telnet ();
$t = new Net::Telnet (Telnetmode => 0,Timeout => 60,Errmode=>'return');
$username="root";
$passwd="root123";
$t->open("10.145.13.227");
$t->login($username, $passwd);
print"successfully loggedin";
@lines = $t->cmd("who");
print @lines;

please guide me.

Thanks,
susintha








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: horizontal scroll bar for drop down list box
•  Wheel Project
•  TO SEND Text message or URL through Clickatell
•  Re: JTable
•  Unix command output displayed 0 in browser
•  Perl 5.6 PPM is not working
•  Re: Need Code
•  telnet to a system with username and password using perl
•  Re: validating drop down


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007