Discussion:
automating password seems fail when using lftp -u
itmwk Smith
2013-10-20 09:52:49 UTC
Permalink
Dear all,

I met a problem when I want to automate password to download file from a
sftp site by "lftp -u".

My question is when using lftp to download file from a sftp site with
automating password :
lftp -e 'set xfer:clobber on; mget -c one_file' -u username,passwd
sftp://hostname
lftp still prompt "Enter your password:" to ask me the password. My
operating system is Windows xp sp3. Can anybody tell me what is problem ?

Background: I want to transfer large files automatically from a sftp site
when some condition is met. I find lftp is a good tool to transfer large
files because it can resume the transfer in background when the link is
disconnected due to the instable net connect status. I use python on
Windows to control lftp to download the large files. But it seems to
automating password in lftp is failed. I also try the expect-like method,
such as winpexpect, but it seems can't solve this problem. However, I find
others use lftp -u to automate password for sftp site when doing google
searching, why it failed here ?

Thank you in advance!

Loading...