BTS

Message4447

Author evgeni
Recipients mika
Date 2012-08-16.20:49:27
Content
verified. you can reproduce this with this simple script:

--<--
#!/bin/sh

askpass() {
  # read -s emulation for dash. result is in $resp.
  set -o noglob
  stty -echo
  read resp
  stty echo
  set +o noglob
}

echo -n "Enter new Windows password for user root: "
askpass
echo
echo "You entered $resp"
-->--

The problem is that calling ssh foo@bar cmd won't allocate a TTY and calling stty without a TTY is 
kinda... stupid.

You can workaround this by calling ssh -t foo@bar cmd.

Not sure how we would fix that properly. Not calling stty in the case there is no TTY would reveal 
your password (try `ssh ... passwd`). We could check for a TTY and error out early.
History
Date User Action Args
2012-08-16 20:49:28evgenisetrecipients: + mika
2012-08-16 20:49:28evgenisetmessageid: <1345150168.48.0.0334525418036.issue1200@bts.grml.org>
2012-08-16 20:49:28evgenilinkissue1200 messages
2012-08-16 20:49:27evgenicreate