#!/usr/bin/perl #this uses Net::SSH, instead of Net::SSH::Perl #and it needs the key method of authentication, #it won't use passwords. use strict; use warnings; use Net::SSH qw(sshopen3); my $user = "zz"; my $host = "zz@.z.net"; my $cmd = "uptime"; sshopen3( "$user\@$host", *WRITER, *READER, *ERROR, "$cmd" ); my $uptime = ; my $error = ; chomp $uptime; print "$uptime\n"; print "$error\n";