[issue1200] grml-debootstrap: password prompt doesn't work through ssh

Evgeni Golov bts at bts.grml.org
Thu Aug 16 22:49:28 CEST 2012


Evgeni Golov <evgeni at grml.org> added the comment:

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 at 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 at 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.

----------
messages: 4431, 4447
nosy: mika
priority: bug
status: chatting
title: grml-debootstrap: password prompt doesn't work through ssh

_____________________________________
GRML issue tracker <bts at bts.grml.org>
<http://bts.grml.org/grml/issue1200>
_____________________________________


More information about the Bugs-changes mailing list