Use aspas duplas duas vezes, com escape e sem escape: -p"\"$MYPASSWORD\""
#!/bin/sh
source pass.cre
/usr/bin/ssh -p 91899 user@remoteHost 'mysqldump -u db_user -p"\"$MYPASSWORD\"" my_database | gzip -c > my_database.sql.gz'
Ou outra versão
/usr/bin/ssh -p 91899 user@remoteHost "mysqldump -u db_user -p\"'io#bc@14@9$#jf7AZlk99'\" my_database | gzip -c > my_database.sql.gz"
Exemplos
% source pass.cre
% ssh user@host mysqldump -u root -p$MYPASSWORD
user@host's password:
zsh:1: bad pattern: -p#8111*@uu(
% source pass.cre
% ssh user@host mysqldump -u root -p"$MYPASSWORD"
user@host's password:
zsh:1: bad pattern: -p#8111*@uu(
% source pass.cre
% ssh user@host mysqldump -u root -p"\"$MYPASSWORD\""
user@host's password:
Warning: Using a password on the command line interface can be insecure.