M
Matthew Thorley
I am working on a script that calls a program ssh in this case. The
script needs to be non-interactive so I need python to comunicate with
ssh. I am having difficult time opening a pipe to the program and
reading and writing output to it. I tried using popen something like:
ssh = popen('ssh user@host')
if ssh[1].readline = 'something':
ssh[0].write('password')
Etc...
But everytime I run the thing stdout still shows up on the command line
and I get propmted to enter the password interactively.
Any thoughts ?
thanks much
-matthew
script needs to be non-interactive so I need python to comunicate with
ssh. I am having difficult time opening a pipe to the program and
reading and writing output to it. I tried using popen something like:
ssh = popen('ssh user@host')
if ssh[1].readline = 'something':
ssh[0].write('password')
Etc...
But everytime I run the thing stdout still shows up on the command line
and I get propmted to enter the password interactively.
Any thoughts ?
thanks much
-matthew