use strict;
use warnings;
use Net::OpenSSH;
$Net::OpenSSH::debug |= 16;
my $ssh = Net::OpenSSH->new(host=>'xx.xx.xx.xx',
user => 'xxxx',
password => 'xxxx'
);
$ssh->error and die "SSH connection failed: " . $ssh->error;
my $command = "ls";
my @out = $ssh->capture($command);
print @out;
以上编程提供以下错误
SSH connection failed: unable to determine home directory for uid 0 at ./ssh.pl
line 12.
我正在使用avtivestate perl(v5.12.3)
虽然我给了另一个用户而不是root用户但却给出了同样的错误 我在主持人上有6.4 有谁可以帮助我?