in reply to Re^4: How to solve Pseudo terminal issue OpenSSH
in thread How to solve Pseudo terminal issue OpenSSH

The remote shell is not recognizing the command sent and dying with some signal (probably SIGHUP or SIGPIPE).

Try using CRLF as the line terminator:

my @output = $ssh->capture({stdin_data => "@cmd\r\n@quitcmd\r\n"});
Note also, that capture may return some content even when an error is signaled and getting the error OSSH_SLAVE_CMD_FAILED may be non fatal.

Replies are listed 'Best First'.
Re^6: How to solve Pseudo terminal issue OpenSSH
by waytoperl (Beadle) on May 14, 2015 at 14:39 UTC
    my @output = $ssh->capture({stdin_data => "@cmd\r\n@quitcmd\r\n"});

    With above line, there is additional PERIOD send Any idea how to remove those PERIODS

    # stdin, bytes written: 18 #> 73 68 6f 77 20 63 6c 6f 63 6b 0d 0a 65 78 69 74 0d 0a + | show clock..exit.. =======>additional + period send from stdin_data # io3 mloop, cin: 0, cout: 1, cerr: 0 # io3 fast, cin: 0, cout: 1, cerr: 0 Pseudo-terminal will not be allocated because stdin is not a terminal.
      The periods are how non-printable characters are represented on the debugging output. It is the classic format for an hexdump.

      In this particular case, they correspond to the CRLF characters ("\r\n").

        Thanks for CRLF information. Any insights How to allocate Pseudo terminal for SSH