If $SSH_ASKPASS is set, SSH will run that program whenever it needs a password. SSH intends this program to be a GUI program that asks the user for the password. But it doesn't have to be. You can have SSH call one of your own scripts, and have your script send the plain-text password.
Note: This ONLY works if your SSH client is from the OpenSSH project. Other SSH clients don't support this. However, OpenSSH is extremely popular and is available almost everywhere.