Use sshpass to automate password based ssh logins
On some systems the SSH server only allows keyboard-interactive password logins. The sshpass util can be used to emulate an interactive keyboard login even if it is run in non interactive mode.
More ...