Obsolete
/
dnsmanagerv1
Archived
3
0
Fork 0
This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues/pull-requests.
dnsmanagerv1/t/ssh1.pl

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);