FTP is built on a client-server model architecture using separate control and data connections between the client and the server. FTP users may authenticate themselves with a clear-text sign-in protocol, normally in the form of a username and password, but can connect anonymously if the server is configured to allow it. For secure transmission that protects the username and password, and encrypts the content, FTP is often secured with SSL/TLS (FTPS) or replaced with SSH File Transfer Protocol (SFTP).
The default port of ftp is 21.
how to use ftp - command line tool
# syntaxftp<DOMAIN>ftp<IP>ftp<USER@IP>ftp<USER@DOMAIN>##### establish an FTP connectionftpdomain.comftpuser@ftpdomain.com##### login (when an ftp server allows anonymous logins, you can login with the following credentials)ftp:*anonymous:*##### list directory on remote serverls# same options are available as on a local server##### change to another directorycd##### set your local directory in which you want to download ftp fileslcd /home/testUser/Desktop # download directory, if not set the directory you connected from will be the download directory
##### download files with ftp (get)getfile# response :# local: file remote: file # 200 PORT command successful. Consider using PASV.# 150 Opening BINARY mode data connection for file (xxx bytes).# 226 File send OK.# XXX bytes received in x.xx secs (x.xxx MB/s).##### download multiple files mget *.html # download all files in the current ftp directory with the extension : .html, anything before the extension does not matter
##### upload files with ftp (put)putfile# upload a file from your current directoryput/root/test/test.txt# uploads a file that was not in your local directory##### upload multiple files with ftp mput*.html##### closing the ftp connectionbyeexitquit##### additional help when you're in the ftp shellhelp