running a command in remote machine by using perl
- by Bharath Kumar
Hi All,
I'm using following code to connect to a remote machine and try to execute one simple command on remote machine.
cat tt.pl
!/usr/bin/perl
use strict;
use warnings;
use Net::Telnet;
$telnet = new Net::Telnet ( Timeout=2, Errmode='die');
$telnet-open('172.168.12.58');
$telnet-waitfor('/login:\s*/');
$telnet-print('admin');
…