in reply to Login Script

I have had success with the unix utility, socat. There are examples for this sort of problem, including scripting a ssh or scp session without using Expect or transferring non-securely.