yellowblueyellow at yellowblueyellow at
Thu Sep 11 03:04:42 CEST 2008

Hey , I need to SSH into a server .. ( 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 admin at')
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

More information about the Python-list mailing list