Net::OpenSSHPerl SSH client package implemented on top of OpenSSH | |
Download |
Net::OpenSSH Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Salvador Fandiño García
- Publisher web site:
- http://search.cpan.org/~salva/
Net::OpenSSH Tags
Net::OpenSSH Description
Net::OpenSSH is a secure shell client Perl package implemented on top of OpenSSH binary client (ssh).SYNOPSIS use Net::OpenSSH; my $ssh = Net::OpenSSH->new($host); $ssh->error and die "Couldn't establish SSH connection: ". $ssh->error; $ssh->system("ls /tmp") or die "remote command failed: " . $ssh->error; my @ls = $ssh->capture("ls"); $ssh->error and die "remote ls command failed: " . $ssh->error; my ($out, $err) = $ssh->capture2("find /root"); $ssh->error and die "remote find command failed: " . $ssh->error; my ($rin, $pid) = $ssh->pipe_in("cat >/tmp/foo") or die "pipe_in method failed: " . $ssh->error; print $rin, "hello\n"; close $rin; my ($rout, $pid) = $ssh->pipe_out("cat /tmp/foo") or die "pipe_out method failed: " . $ssh->error; while () { print } close $rout; my ($in, $out ,$pid) = $ssh->open2("foo"); my ($pty, $pid) = $ssh->open2pty("foo"); my ($in, $out, $err, $pid) = $ssh->open3("foo"); my ($pty, $err, $pid) = $ssh->open3pty("login"); my $sftp = $ssh->sftp(); $sftp->error and die "SFTP failed: " . $sftp->error;Product's homepage
Net::OpenSSH Related Software