jueves, 10 de septiembre de 2009

lftp, I love you

There are little programs that surprise me positively now and then.

One of theese programs is lftp. It's a ftp/scp/sftp console program, but it's so well thought and so intuitive, that in 30 seconds I just managed to do the following:

I wanted to connect to my ssh server and download some files. Normally I'd do it with scp, but as I haven't still set up my public/private keys (so I can't use tab completion on scp), I thought There should be a way to stay connected and browse through a remote directory and download what I want. In fact, I already implemented this functionality in ratfinder, using Casiano's GRID::Machine , but I wanted a console app.

I installed lftp (slapt-get --install lftp from vectorlinux), and then connected to my server.

$ lftp
o 192.168.1.35
Password: ******
ls
[FAIL]

Then I read the man page, and noticed there's a protocol called fish that seems to do exactly what I want.

so, now I wrote in a terminal

$ lftp -u kidd fish://192.168.1.35
Password: ******
ls

and I was there!!!

Now with a simple 'get' I can transfer my files :)