On 05 Oct 2007 16:23:50 GMT, Stargaming <[EMAIL PROTECTED]> wrote: > On Fri, 05 Oct 2007 08:37:05 -0700, timw.google wrote: > >> I can't ssh w/o supplying a password. That's the way the security is > >> set up here. > >> > >> How do I use python to do this, or do I just have to write a zsh > >> script? > >> > >> Thanks. > > > > I wrote a zsh script to do what I wanted, but I'd still like to know how > > to do it in Python. > > `subprocess.Popen` has a keyword argument called `stdin` -- what takes > the password, I guess. Assigning `subprocess.PIPE` to it and using > `Popen.communicate` should do the trick.
SSH doesn't read passwords off of stdin. If you want to supply a password to SSH, then you need to control a pty directly. -- Nick -- http://mail.python.org/mailman/listinfo/python-list