Hey , I need to SSH into a server .. (10.8.42.38) using pexpect the
username is 'admin' and password is 'abc123' so far i have the
following code
import pexpect
import sys
import time
import os
foo = pexpect.spawn('ssh [EMAIL PROTECTED]')
ssh_newKey = 'Are you sure you want to continue connecting'
foo.expect = ssh_newKey
foo.send = 'yes'
foo.expect = 'password:'
foo.send = 'abc123'
-------------------------------------------------------------------------------------------------
does this look right?
if not , could someone suggest a way to do this ..
your help is much appreciated
--
http://mail.python.org/mailman/listinfo/python-list