paperlined.org
apps > ssh
document updated 12 years ago, on Dec 27, 2011
The SSH manpages go out of their way to suggest that you can't call SSH from a script and pass it the password. While that's mostly true, there is one exception: $SSH_ASKPASS.

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.