in reply to SSH Expect running apps

Have you read "IMPORTANT NOTES ABOUT DEALING WITH SSH AND PSEUDO-TERMINALS" section from Net::SSH::Expect documentation?