while read LINE
do
something-that-needs-terminal < /dev/tty
done < inputfile
I'm a little surprised keytool doesn't do this automatically, though. Usually things that read passwords absolutely insist on using the terminal. But if it's a bulk generation tool it makes sense.
Well, yes, you redirect stdin from "hello.txt", and keytool reads from stdin (c.f. man keytool )... Try opening "hello.txt" on another file descriptor.