FTPing in Bash
FTPing has always been a graphical, drag-and-drop thing for me. When I was running a Red Hat web server a few years ago, I used to use the wget command sometimes, especially when the hosting company sent an email around asking for the software to be upgraded. But for FTP itself, I’ve been firmly a GUI man. Until now.
There are a number of commands that do FTP, including ftp, sftp and lftp. The RHCT book I’m following recommends using lftp as this is the one Red Hat exam prep guide refers to, and because it’s particularly powerful. I wanted to know if lftp (like sftp) sends passwords securely, so I looked at the man pages for lftp and was informed that lftp defaults to a secure transmission of the password where available. Excellent.
To log into an FTP site anonymously, you enter:
lftp ftp.redhat.com
or to connect with a username and password, type:
lftp username@ftp.redhat.com
or
lftp -u username ftp.redhat.com
From there you have a Bash-style command line with the ability to enter commands like ls. The important extra commands are: put and mput, along with get and mget (the ‘m’ lets you work with multiple files. To finish the FTP session, type quit.
Filed under: Network clients | Leave a Comment
No Responses Yet to “FTPing in Bash”