Hi,
I am having nightmare issue-ing remote ssh command from a CGI perl script.
It just won't run on debug message: It says permission denied. Can I even do this? as the apache server running under DAEMON account probably can't execute it? Is this the case of what's going on?
Here is my snippet:
system ("ssh 172.16.10.12","htpasswd -b /etc/squid/squid_passwd $user_name $pass_word");
if ($? == -1) {
print "Command Failed: $!\n";
} else {
print "Command exited with value %d", $? >>8;
}
I have tried using the backtick way and execute way too but I just can't get it. The apache box from where the CGI script is executed and the ssh box in question ARE setup for passwordless ssh auth and it works fine.
Any help is highly appreciated.
Thanks.