This is related to this question here, but with a slight twist: instead of just passing 'yes' or 'no', I need Fabric to pass an arbitrary string to the remote shell.
For instance, if the remote shell prompts for 'what is your name?' then I need to feed it 'first,last'.
Update #1: Got a response from Jeff Forcier @bitprophet
解决方案
Interaction with remote servers is finally supported in Fabric 1.0. See this page for details.