Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^5: Net::OpenSSH + CGI problem

by fwalters (Novice)
on Feb 17, 2017 at 13:29 UTC ( [id://1182204]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Net::OpenSSH + CGI problem
in thread Net::OpenSSH + CGI problem

Yes, works great on command line, and using the www-data user as well from command line...

I read through the FAQ but I'll look again with fresh eyes. Any other thoughts?

Maybe I'll put a sniffer on it and watch the packets.

Replies are listed 'Best First'.
Re^6: Net::OpenSSH + CGI problem
by salva (Canon) on Feb 17, 2017 at 18:35 UTC
    The issue seems related to STDIN being closed when called from the CGI. It looks like a bug in the Cisco SSH implementation.

    Try creating a pipe and passing the read side as the stdin stream.

      I am now able to recreate this from the command line. If I have the script call /bin/bash instead of what I want to type and then I run the script (from command line), and then I run the cgi manually, it fails in the same manner as CGI.

      The user is correct (www-data) but there are no environment variables set..?

        Then, enable debugging in both cases and post here the output. That would allow us to see what's different.
        I don't remember who inspired me to this cgi debug script (either someone here or on reddit), but I think it would be useful in your case, too.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1182204]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-04-18 19:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found