http://www.perlmonks.org?node_id=913805


in reply to Using Expect to handle Net::OpenSSH 2nd password prompt?

perhaps Net::SSH::Expect might be more appropriate here?