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

Quick followup...

we run some Cisco ASR and IOS based routers, apparently the IOS based routers work fine, while the ASR (IOXR) based routers.

The main difference, at least visually, is the prompt:

For the working router the prompt I get is:

1-CHI-RR1-Curly#

While for the one that doesn't work I get:

RP/0/RSP0/CPU0:1-CHI-PE14-SOB-QuiGon#

Replies are listed 'Best First'.
Re^4: Net::OpenSSH + CGI problem
by salva (Canon) on Feb 16, 2017 at 21:07 UTC
    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.

      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.