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


in reply to Re: how to send input to stdin automatically?
in thread how to send input to stdin automatically?

ssh (as most programs asking for a password) does not read the password from stdin but from the process tty, so not opening a pipe neither using any of the modules you have named will work.

The usual solution to automate password authentication is to use Expect.