my $ip = shift @ARGV || die "usage: $0 IP command[ command ...]\n";
$ip = $1 if `host $ip` =~ m/has address (\S+)/;
my @commands = @ARGV;
my $ip = shift @ARGV || die "usage: $0 IP command[ command ...]\n";
$ip = $1 if `host $ip` =~ m/has address (\S+)/;
my @commands = @ARGV;
warn "\n## ssh $ip\n";
my $ssh = Net::OpenSSH->new($ip, user => $login, passwd => $passwd, default_ssh_opts => [-o => "StrictHostKeyChecking=no"]);
warn "\n## ssh $ip\n";
my $ssh = Net::OpenSSH->new($ip, user => $login, passwd => $passwd, default_ssh_opts => [-o => "StrictHostKeyChecking=no"]);