Hey,
I'm trying to execute a command over a remore server using pexpect
+++++++++++++++++
url = 'ssh internalserver'
res = pexpect.spawn(url)
print '1'
res.expect('.*ssword:')
print '2'
res.sendline('mypasswd')
print '3'
res.sendline('ls -aslh')
+++++++++++++++++
What I want to do is to send a couple of commands and get the
response.
How to do this?
Thanks.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to