in reply to
Expecting more from expect
You may need to reset the accumulator size. From the Expect manpage:
$object->max_accum($maximum_buffer_length | undef)
Set the maximum accumulator size for object. This is useful if you think that the accumulator will grow out of hand during expect() calls. Since the buffer will be matched by every match_pattern it may get slow if the buffer gets too large. Returns current value if called without parameters. Not defined by default.
P.S. The scp(1) program might be a better way to go.