2009年3月25日星期三

lftp with ssl/tls and more

Even though the encode of my ftp server is set to POSIX, and I've configured
set ftp:charset "gbk"
set file:charset "utf-8"

in ~.lftp/rc, which worked before, lftp on my computer still cannot display Chinese characters normally on the ftp server. And with no means can I figure this out.
Today I need to access my ftp server with ssl/tls protocol, and I tried the following command in lftp prompt:
set ftp:ssl-force true
connect ftp.domain.com
login username
Password:
ls

And I found it works perfectly and even the characters can be displayed normally!
Know maybe the truth is just that I've never digged deep enough, but the simple and out-of-expect solvement really made me quite happy. CLI is so powerful, that I can't wait to put all my friends up for this tiny thing.

Add: you can add "set ftp:ssl-force true" in ~.lftp/rc, and bookmark and "open" the encrypted site as usual

没有评论: