How to use lftp as a sftp client

lftp is a very powerful and user friendly command line ftp client. It can also be used with many other protocols such as SFTP.

Check to see if lftp is compiled for sftp support
./configure --with-openssl=/usr/lib
 * 1) find where lftp is installed
 * 2) *type which lftp
 * example output: /usr/local/bin/lftp
 * 1) Check linked libraries
 * 2) * Execute: ldd /usr/local/bin/lftp
 * 3) * Example output:
 * linux-gate.so.1 => (0xffffe000)
 * libexpat.so.0 => /usr/lib/libexpat.so.0 (0xb7f8e000)
 * libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0xb7f5c000)
 * libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0xb7e58000)
 * libreadline.so.5 => /lib/libreadline.so.5 (0xb7e28000)
 * libutil.so.1 => /lib/libutil.so.1 (0xb7e24000)
 * libncurses.so.5 => /lib/libncurses.so.5 (0xb7de2000)
 * libresolv.so.2 => /lib/libresolv.so.2 (0xb7dd0000)
 * libdl.so.2 => /lib/libdl.so.2 (0xb7dcb000)
 * libm.so.6 => /lib/tls/libm.so.6 (0xb7da8000)
 * libgcc_s.so.1 => /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libgcc_s.so.1 (0xb7d9f000)
 * libc.so.6 => /lib/tls/libc.so.6 (0xb7c88000)
 * /lib/ld-linux.so.2 (0xb7fbc000)
 * 1) To use sftp with lftp
 * 2) * libssl must show like above.
 * libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0xb7f5c000)
 * 1) * the version and other info does not need to be the same but libssl must appear
 * 2) **if libssl is not listed.
 * 3) **#install SSL (sudo apt-get install libssl-dev)
 * 4) **#recompile lftp with ssl support

Using lftp with sftp

 * Basic usage is:
 * lftp sftp://[domain name]
 * lftp sftp://theURL.org
 * For a different user name than the one you are currently using
 * lftp sftp://[user name]@[domain name]
 * lftp sftp://userName@theURL.org
 * for a different port and different user name
 * lftp sftp://[user name]@[domain name]:[port number]
 * lftp sftp://userName@theURL.org:8002