I am using SFTP (SSH) Per a suggestion on the list, I tried the following, but same behavior:
set ftp:web-mode true open -u "username,password" -p 22 sftp://hostname/ put /tmp/test.bin <- works close put /tmp/test.bin <- still connects and upload a file Certainly an unwanted behavior in the environment I'm working in. Imagine the following scenario: open -u "username1,password1" -p 22 sftp://site1/ <- works mput /tmp/site1.* <- works close open -u "username2,password2" -p 22 sftp://site2/ -< fails mput /tmp/site2.* <- since the lat open failed, still connects to site 1 and upload a file, hence high risk. Interested on how to resolve this, ie how to safely open and close multiple connections in the same lftp script. Thanks ! On 1/28/2015 3:09 PM, Szépe Viktor wrote: > Maybe this helps you > > ftp:web-mode (boolean) > disconnect after closing data connection. This can be > useful for totally broken ftp > servers. Default is *false* > > http://lftp.yar.ru/lftp-man.html > > > > Idézem/Quoting System Administrator <t...@criticalsys.net>: > >> Hi, >> >> I'm having an issue understanding the effect of the command *close*, as >> it seems different than a disconnect. >> >> With lftp 4.6.1: >> >> open -u "username,password" -p 22 sftp://hostname/ >> ls <- returns a listing >> close >> ls <- still connects and returns the listing ! I expected this to >> fail. >> >> Could we have an option (-k) to close that would actually disconnect >> from the connection open previously, this to allow subsequent open >> commands with no risks. >> >> Please let me know if I missed something obvious. >> Best regards. >> _______________________________________________ >> lftp mailing list >> lftp@uniyar.ac.ru >> http://univ.uniyar.ac.ru/mailman/listinfo/lftp > > > Szépe Viktor _______________________________________________ lftp mailing list lftp@uniyar.ac.ru http://univ.uniyar.ac.ru/mailman/listinfo/lftp