ssh, and most other sane login systems, are designed to never, ever read a password from a script. This is a security feature, since retrievably-stored passwords are almost impossible to keep safe. "interactive password authentication" means "password typed by a
human being in
realtime authentication" and nothing else is supposed to do. You'd need to install third-party brute forcing utilities like
expect to even try, and that'd be much harder than the proper way, i.e. using some noninteractive form of authentication.
The proper way to do automatic ssh logins is with
keys.
ssh is able to prompt for a password even when stdin is redirected because it can simply open /dev/tty direct, whenever a terminal is available; and if one isn't available, it has no business accepting a password...