use Net::OpenSSH; use Net::Telnet; my $ssh = Net::OpenSSH->new('pa:abc@10.0.0.1'); my ($fh, $pid) = $ssh->open2socket(); my $conn = Net::Telnet->new(Fhopen => $fh); my @lines = $conn->cmd("sh ver"); print join "\n"; #### Pseudo-terminal will not be allocated because stdin is not a terminal. command timed-out at t1.pl line 6