3
0
This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues or pull requests.
dnsmanagerv1/t/ssh1.pl
2014-01-26 20:46:22 +01:00

25 lines
376 B
Perl

#!/usr/bin/perl -w
use strict;
use warnings;
use v5.14;
use autodie;
use Modern::Perl;
use Data::Dump qw( dump );
use DNS::ZoneParse;
use Net::SSH q<sshopen2>;
my $host = "pizza";
my $user = "karchnu";
my $cmd = "ls /";
sshopen2("$user\@$host", *READER, *WRITER, "$cmd") || die "ssh: $!";
while (<READER>) {
chomp();
print "$_\n";
}
close(READER);
close(WRITER);