title: Mocking crypto/ssh/terminal
body: <p>Has anyone had any success or have any ideas on what would be the best way to mock entry (for testing purposes) to a <code>term.ReadPassword(int(os.Stdin.Fd()))</code> call in the <code>golang.org/x/crypto/ssh/terminal</code> package?</p>
  
  <p>I have tried creating a temp file (vs <code>os.Stdin</code>) and writing string values like <code>testing\n</code> or <code>testing\r</code> to the temp file but I get the error <code>inappropriate ioctl for device</code>. I'm guessing it is something TTY related or a specific format that is missing(?) but I really am not sure.</p>
  
  <p>Help appreciated.</p>