On 2008-06-04, Mallikarjun Melagiri <[EMAIL PROTECTED]> wrote:
> Hi Noah,
>
> I am new to python. I'm trying to use pexpect.
>
> Following is my problem definition:
>
> I should have a script on my machine A, which
> should 'ssh' to machine B and from there i
>
>
>
>
> cmd ='scp'+' '+source_file+' '+user+'@'+ip+':'+desti_path
>
You might wanna try to login with a public/private key pair, then scp
won't ask for a password.
--
http://mail.python.org/mailman/listinfo/python-list
Kevin Erickson wrote:
> On Jun 30, 5:50 pm, Kevin Erickson <[EMAIL PROTECTED]> wrote:
> > #Begin Code
> >
> > import sys
> > import pexpect
> >
> > def GetServerData(self):
> > foo = pexpect.spawn('scp [EMAIL PROTECTED]:/home/config/
> > role{/file1,/files/file2,/files/file3} /tmp')
>
On Jun 30, 5:50 pm, Kevin Erickson <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am attempting to use pexpect in python to copy files from a server
> using scp; the copy works however exceptions are thrown and it exits
> unsuccessfully. Below is the a sample code and the error:
>
> #Begin Code
>
> im