Error: bad password or master process exited unexpectedly
Apache/2.2.17 using suexec; perl, v5.10.0 built for sun4-solaris; OpenSSH_5.3p1 OpenPKG-CURRENT, OpenSSL 0.9.8k 25 Mar 2009;
Apache runs as user AP, while my CGI runs via suexec as user U2.
My Module contains the following method and is called from the main CGI script. If the same code is used directly in a .pl on the command line it works.
# Create / Remove ZFS-Directories sub changeZFS { my $type = shift; my $UID = shift; my $IDname = shift; my $ou = shift; my $msg; my ($stdout, $stderr, $exit) = undef; my $ssh = Net::OpenSSH->new("$ZFS_HOST", ctl_dir => $SSH_CTLDIR, u +ser => $SSH_USER, passwd => $SSH_PWD); $ssh->error and return "Cannot Create Homedirectory $ZFS_HOST: + " . $ssh->error(); print LOG "changeZFS(): $ZFS_HOST: $ZFS_CMD $type $UID $IDname $ou +\n"; ($stdout, $stderr, $exit) = $ssh->capture({timeout => 20}, "$ZFS_C +MD $type $UID $IDname $ou:"); $ssh->error and print LOG "Command $ZFS_CMD failed: " . $ssh-> +error; print LOG "OUT=$stdout, ERR=$stderr, EXIT=$exit\n"; print LOG "changeZFS() msg:$stdout\n"; return $stdout; }
I assume the Net::OpenSSH uses user=AP as I needed to change the CTL_DIR away from the HOME of AP. This user is very restricted and has no ~/.ssh directory.
Running from CLI as AP works as well but fails adding known_hosts
In reply to Net::OpenSSH - connection from out a CGI script fails by tgdaero
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |