Yes sshpass is a good option, you can use it as below
sshpass -p "pass_here" ssh user@ip "cd $HOME; exit" #password is provided on the command line with semi-colon separated commands
Note: you need to install sshpass before you use it, it can be install using simple command as below,
apt-get install sshpass