GaijinPunch has asked for the wisdom of the Perl Monks concerning the following question:
When I run this through the browser, I get the following error:my $ssh = Net::SSH::Perl->new('host'); $ssh->login('user','pass'); my ( $stdout, $stderr, $exit ) = $ssh->cmd('uptime'); print qq(Content-type: text/html ); print "output from ssh: $stdout\n"; print "error from ssh: $stderr\n"; print "</html>\n";
It looks to me as if it's trying to create a .ssh directory in / (which it obviously doesn't have permission to do). /etc/passwd says that apache's homedir is /home/httpd.mkdir /.ssh: Permission denied at /usr/lib/perl5/vendor_perl/5.8.4/Net +/SSH/Perl/Util/Hosts.pm line 50
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SSH::Net::Perl and Apache
by GaijinPunch (Pilgrim) on Jun 15, 2005 at 01:03 UTC | |
by Anonymous Monk on Oct 04, 2005 at 22:25 UTC |