The meta-answer: if it was this easy people wouldn't keep asking about it. For decades now!
When I tried it fifteen years ago ssh insisted on reading the password from keyboard input, not stdin.
SSH reads the password from the terminal, otherwise it couldn't read the password on a piped input