I have a script where I ask for a password and store it in a variable, and then use it with sudo on an array of other hosts. The password winds up being choed back to my terminal as well as to the process on the remote host, like:
Attempting to update Google Chrome on palms
googlechrome.dmg 100% 48MB 48.0MB/s 00:01
MyPassword
Password:
Connection to palms closed.
"disk3" unmounted.
"disk3" ejected.