Originally Posted by joec@home
what you are looking for is:
echo 'mkdir abcd' | sshpass -p 'MyPassWord' ssh email@example.com bash
to get a visual response during debugging.
This works for me here, where 'db' is a key-based alias for quick remote ssh to my dorkblog:
echo "mkdir -pv abcd" | db bash
mkdir: created directory abcd