FTP (File Transfer Protocol)

FTP server listens on TCP port 21 by default. Very efficient for file transfer. Can be faster than HTTP

Example commands defined by the FTP protocol are:

  • USER is used to input the username

  • PASS is used to enter the password

  • RETR (retrieve) is used to download a file from the FTP server to the client.

  • STOR (store) is used to upload a file from the client to the FTP server.

In the terminal below we executed the command ftp 10.10.240.137 to connect to the remote FTP server using the local ftp client. Then we went through the following steps:

  • We used the username anonymous to log in

  • We didn’t need to provide any password

  • Issuing ls returned a list of files available for download

  • type ascii switched to ASCII mode as this is a text file

  • get coffee.txt allowed us to retrieve the file we want

What happens in the terminal

With Wireshark we can see the exchange more closely. The client’s messages are in red, while the server’s responses are in blue

What happens between the client and the server

Last updated