Problems writting a wrapper around linux' ssh command

Gregory Jorgensen gregj at pobox.com
Sat Mar 10 15:34:19 EST 2001


ssh explicitly opens /dev/tty to read the password, so it's not looking on stdin
(see the readpass.c file in your ssh sources). In a normal terminal session
stdin is mapped to /dev/tty, but a child process started with popen2 will have
stdin mapped to the Popen3.tochild file descriptor. Can you use one of the other
secure authentication methods ssh supports?


In article <31rd89.lki.ln at 127.0.0.1>, gradha at iname.com says...
>
>Hi.
>
>I am trying to write a python wrapper around ssh. The last and only problem
>I have is password verification. I try to popen2.popen3 the ssh command,
>but no matter what I write to the input file, the ssh command ignores it
>and keeps requesting *keyboard* input.
>
>Is there any way to avoid this?


Greg Jorgensen
Deschooling Society
Portland, Oregon, USA
gregj at pobox.com



More information about the Python-list mailing list