How To SSH run command without key-in password again
echo < password > | ssh username@host 'sudo -S < command >'
Running Two SSH Command line for sqldump
ssh -t username@host 'mysqldump -u {DB_USER} -p"{DB_PASS}" {DB_NAME}' > dump.sql | ssh -t username@host 'cat dump.sql' > local.sql