HowTo use lftp as a sftp client

lftp is a file transfer program that allows sophisticated ftp, http and other connections to other hosts. If site is specified then lftp will connect to that site otherwise a connection has to be established with the open command.

Basic usage

  • lftp sftp://[domain name]
  • lftp sftp://example.com

Use a different user name than the one you are currently using

  • lftp sftp://[user name]@[domain name]
  • lftp sftp://username@example.com

Use a different port and different user name

  • lftp sftp://[user name]@[domain name]:[port number]
  • lftp sftp://userName@example.com:2222

Recursive download/upload

lftp> mirror directory_to_download
lftp> mirror -R directory_to_upload

For more lftp options type the following command in a console window

# man lftp