in reply to tty Problem while executing command's with sudo over Net::SSH2
Also, as it seems that you are on a Unix/Linux system, you may like to use Net::OpenSSH instead of Net::SSH2:
my $ssh = Net::OpenSSH->new($host, user => $user, password => $passwor +d); $ssh->error and die "SSH connection failed: " . $ssh->error; $ssh->system({tty => 1}, $ARGV[0]) or die "remote command failed: ". $ssh->error;
|
|---|