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

Does Net::OpenSSH work against both kinds of routers when used outside the CGI environment?

The module FAQ contains an entry about common issues when connecting to network equipment.

Replies are listed 'Best First'.
Re^5: Net::OpenSSH + CGI problem
by fwalters (Novice) on Feb 17, 2017 at 13:29 UTC
    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.
      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..?