my $ssh = Net::OpenSSH->new($host, user => $user, password => $password); $ssh->error and die "SSH connection failed: " . $ssh->error; $ssh->system({tty => 1}, $ARGV[0]) or die "remote command failed: ". $ssh->error;