On Debian-based distributions, the sshpass package provides an easier way of doing what you want. The package is available for many other popular distributions. You need to set it up first:
touchecho passwordFile.txt
chmod'YourPassword' 600> passwordFile.txt
echo 'YourPassword'chmod >600 passwordFile.txt
Then invoke the SSH command from a script like this:
sshpass -f /path/to/passwordFile.txt /usr/bin/ssh -p 8484 [email protected]
This provides more flexibility, such as if you're using a different locale or need to change the password, than solutions using expect.