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

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.

Replies are listed 'Best First'.
Re^7: How to solve Pseudo terminal issue OpenSSH
by salva (Canon) on May 14, 2015 at 16:29 UTC
    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

        my ($pty, $pid) = $ssh->open2pty();
        See the section about integrating with Expect on the module documentation.

        In any case, you should investigate why ssh is requesting a remote tty when it is not requested. That is quite unusual (even if probably harmless).