Johannes Scholz | 2 Feb 11:11 2011

lftp set ftp:* per connection

Hi there,

I want to run several jobs in parallel on different ftp servers and I was wondering whether it is possible to
make settings like ftp:ssl-protect-data on a per connection level, rather than setting them globally
(preferably without adding bookmarks).

Thanks a lot

Regards,

Johannes Scholz

Daniel Fazekas | 2 Feb 12:20 2011
Picon

Re: lftp set ftp:* per connection

On Feb 2, 2011, at 11:11, Johannes Scholz wrote:

> I want to run several jobs in parallel on different ftp servers and I was wondering whether it is possible to
make settings like ftp:ssl-protect-data on a per connection level, rather than setting them globally 

set ftp:ssl-protect-data/example.com yes
set ftp:ssl-protect-data/example.org no

Johannes Scholz | 2 Feb 12:31 2011

Re: lftp set ftp:* per connection

Excellent, thanks a lot!

Am 02.02.2011 um 12:20 schrieb Daniel Fazekas:

> On Feb 2, 2011, at 11:11, Johannes Scholz wrote:
> 
>> I want to run several jobs in parallel on different ftp servers and I was wondering whether it is possible
to make settings like ftp:ssl-protect-data on a per connection level, rather than setting them globally 
> 
> set ftp:ssl-protect-data/example.com yes
> set ftp:ssl-protect-data/example.org no
> 
> 

JL Picard | 2 Feb 17:37 2011
Picon

LFTP Issues Connecting to SOCKS Proxy


I am trying to configure my LFTP FTP session to use a SOCKS Proxy (Dante v1.2.0) on my server
gateway.mydomain.com on port 1080 with no success.  Dante does not require any authentication to
connect outbound.  Near as I can tell it doesn't even attempt a connection to the proxy server, which I
know is working since other processes use it readily.

Based on what documentation I can find I have set the following variables:
SOCKS5_PROXY=gateway.mydomain.com:1080
SOCKS_PROXY=gateway.mydomain.com:1080

When I run LFTP, I attempt the following sets of commands in the shell with no connection:

Session Information (with no ftp:proxy):
  lftp :~> set net:timeout 30
  lftp :~> set net:max-retries 2
  lftp :~> debug 9
  lftp :~> open ftp://myUser:myPasswd <at> 64.3.120.162
  ---- Resolving host address...
  ---- 1 address found: 64.3.120.162
  lftp myUserr <at> 64.3.120.162:~> cd myUser_dir
  ---- Connecting to 64.3.120.162 (64.3.120.162) port 21
  **** connect(control_sock): Connection refused
  ---- Closing control socket

Session Information (with ftp:proxy):
  lftp :~> set net:timeout 30
  lftp :~> set net:max-retries 2
  lftp :~> debug 9
  lftp :~> set ftp:proxy gateway.mydomain.com:1080
  lftp :~> set ftp:proxy-auth-type open
(Continue reading)

Jonathan Kaufman | 7 Feb 17:54 2011

{Spam?} "batch" lftp return code 0 when it shouldn't? (what am I doing wrong)


A problem I am attempting to troubleshoot is that lftp returns an return
code of 0, despite the fact that it can't login to the remote server and
the rest of the commands run also fail.

If I do the exact same commands manually, then lftp returns a code of 1
(expected).

So for example, let's assume we are going to run lftp using a command
script

lftp -f t.cmd

and t.cmd contains the following..

open -p 990 serverA
user bill fred
cd /
close
quit

now, the username and password I'm using are incorrect, so the ftp process
can't authenticate so this "job" will fail, I was expecting lftp to behave
similiar to manual mode in which this behavior causes lftp to return a
non-zero code of 1.

[root <at> serverB]:[/tmp] > lftp -f t2.prm
---- Resolving host address...
---- 1 address found: xxx.xxx.xxx.xxx
---- Connecting to serverA (xxx.xxx.xxx.xxx) port 990
(Continue reading)

Daniel Fazekas | 7 Feb 18:49 2011
Picon

Re: "batch" lftp return code 0 when it shouldn't? (what am I doing wrong)

On Feb 7, 2011, at 17:54, Jonathan Kaufman wrote:

> A problem I am attempting to troubleshoot is that lftp returns an return code of 0, despite the fact that it
can't login to the remote server and the rest of the commands run also fail.
> 
> So for example, let's assume we are going to run lftp using a command script
> lftp -f t.cmd
> and t.cmd contains the following..
> open -p 990 serverA
> user bill fred
> cd /
> close
> quit

Change the "cd /" line like this:
cd / || exit 1

Alexander V. Lukyanov | 8 Feb 16:04 2011
Picon

Re: lftp - bookmark suggestion

On Mon, Feb 07, 2011 at 03:00:55PM +0000, PMcD wrote:
> I like your lftp. Would it be possible to add the local directory
> you are in to the bookmark? Say I run lcd /local/directory, then I
> run bookmark add friendlyname, wouldnt it be cool if the local
> directory was added to the bookmark?

Starting with lftp-4.1.0 you can:

   local bookmark add NAME

Then a bookmark to file:/dir/path is created.

> I'm not a programmer so I can't help there. Also lls would be cool
> command to list the local directory.

You can either !ls or do this

   local ls
or
   alias lls local ls

--

-- 
   Alexander.

Joe Thielen | 9 Feb 18:04 2011

LFTP issue with gnutls_handshake

Hello all.  After upgrading a server with a newer Linux distro (Mandriva 2007.1 -> 2009.1) I've noticed I'm unable to use LFTP to send files via FTP/SSL.  After finding the LFTP "debug" command, I come up with:

---- Connecting to XXX (X.X.X.X) port 21
<--- 220 XXX X2 WS_FTP Server 5.0.4 (3600386300)
---> FEAT
<--- 530 Please login with USER and PASS
---> AUTH TLS
<--- 234 SSL enabled and waiting for negotiation
---> USER XXX
**** gnutls_handshake: The Diffie Hellman prime sent by the server is not acceptable (not long enough).
---- Closing control socket

I'm not an expert in these things by any means.  I looked up that error on Google, but mostly came up with replies about the "mutt" e-mail program, and I can't figure out how to make any of those solutions applicable to LFTP without having to recompile gnutls. 

The server I'm trying to connect to is not under my control, I highly doubt I'd be able to convince them to upgrade their SSL certificate.

Any ideas?

Joe Thielen | 9 Feb 18:34 2011

Re: LFTP issue with gnutls_handshake

After some further playing around, I was able to route around the problem with gnutls by compiling LFTP with OpenSSL instead of gnutls:

./configure --prefix=/usr --without-gnutls --with-openssl

For reference, this worked with LFTP 4.1.3 on Mandriva Linux 2009.1 and 2007.1.

On Wed, Feb 9, 2011 at 12:04 PM, Joe Thielen <joe <at> joethielen.com> wrote:
Hello all.  After upgrading a server with a newer Linux distro (Mandriva 2007.1 -> 2009.1) I've noticed I'm unable to use LFTP to send files via FTP/SSL.  After finding the LFTP "debug" command, I come up with:

---- Connecting to XXX (X.X.X.X) port 21
<--- 220 XXX X2 WS_FTP Server 5.0.4 (3600386300)
---> FEAT
<--- 530 Please login with USER and PASS
---> AUTH TLS
<--- 234 SSL enabled and waiting for negotiation
---> USER XXX
**** gnutls_handshake: The Diffie Hellman prime sent by the server is not acceptable (not long enough).
---- Closing control socket

I'm not an expert in these things by any means.  I looked up that error on Google, but mostly came up with replies about the "mutt" e-mail program, and I can't figure out how to make any of those solutions applicable to LFTP without having to recompile gnutls. 

The server I'm trying to connect to is not under my control, I highly doubt I'd be able to convince them to upgrade their SSL certificate.

Any ideas?

Alexander V. Lukyanov | 10 Feb 09:33 2011
Picon

Re: Lftp problem

On Tue, Feb 08, 2011 at 06:43:05PM +0000, dean.licheri <at> bt.com wrote:
> Local system is a redhat box running lftp  Version 3.0.6

Please upgrade to latest lftp version (4.1.3).

--

-- 
   Alexander.


Gmane