in reply to Net::SSH2 shell in Windows

Not that it probably helps all that much, but you're script works fine for me on MS Windows, connecting to an ssh server on a local linux box.
I get:
ONE: [/home/rob] TWO: [rob pts/0 Jun 27 11:37 ] TWO: [rob pts/1 Jun 27 11:37 ] TWO: [rob pts/2 Jun 27 11:37 ] TWO: [rob pts/3 Jun 27 11:37 ] THREE-a: [/home/rob ] THREE-b: [rob pts/0 Jun 27 11:37 ] THREE-b: [rob pts/1 Jun 27 11:37 ] THREE-b: [rob pts/2 Jun 27 11:37 ] THREE-b: [rob pts/3 Jun 27 11:37 ]
I think the inserted newline in the "THREE" outputs arises because those replies (unlike the earlier ones) have not been chomp()ed.

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Net::SSH2 shell in Windows
by coldmiser (Hermit) on Jun 27, 2012 at 17:03 UTC
    Actually that does help, I don't have another unix box to test this against so it sounds like the script works correctly, but for some reason the unix box is doing something strange.