I've tried this on multiple versions of SSH, but the most recent is 5.2p1, tested on Linux and Solaris. When passing a command on the command line that requires a secondary password, ssh echos the password to the console. For example: ssh me@example.com "mysqldump -u root -p mysql" > file.sql Will result in asking me for the ssh password correctly and then echoing the mysql password to the console. I believe it should not do that.
This behaviour is expected. When you specify a command on the ssh command-line you turn off TTY allocation, which is necessary to suppress keyboard echo. You can force the use of a TTY using the -t flag to ssh.
Move resolved bugs to CLOSED after 5.7 release