in reply to Re^3: Net::OpenSSH multiple commands
in thread Net::OpenSSH multiple commands

This looks like a bug on the router SSH stack. Try to replicate it running the following command from the command line in order to discard Perl or Net::OpenSSH as the cause of the problem.
ssh router <<EOC terminal length 0 terminal width 512 show ip accounting exit EOC

I guess the malfunction is caused by some buffer overflow on the remote shell that is triggered by the longer command line.

Replies are listed 'Best First'.
Re^5: Net::OpenSSH multiple commands
by mlebel (Hermit) on Apr 25, 2012 at 11:36 UTC
      my working solution has been provided on the main page.