use Net::Telnet (); $t = new Net::Telnet (Timeout => 10, Prompt => '/ksh\$ $/'); $t->open($host); $t->login($username, $passwd);