Install TFTP on Debian


Available TFTP Server

  • atftpd
    Advanced TFTP server.
  • tftpd
    Trivial file transfer protocol server.
  • tftpd-hpa
    HPA’s tftp server.
  • dnsmasq
    Lightweight DNS, TFTP and DHCP server.

Install TFTP Server

Install tftpd-hpa

  1. Do everything in this chapter as root or using sudo
  2. Install tftpd-hpa
    # apt install tftpd-hpa
  3. Check configuration
    # vim /etc/default/tftpd-hpa

    The default configuration on Debian look like this

    # /etc/default/tftpd-hpa
  4. Create a test file to tftp directory
    # echo "test" > <TFTP_DIRECTORY>/test.txt
  5. Restart server if configuration is changed
    # systemctl start tftpd-hpa
  6. Check status of server
    # systemctl status tftpd-hpa

Test TFTP Server

  1. Install TFTP client.
    Do it as root or using sudo.

    # apt install tftp
  2. Connect to server and download the test file
    $ tftp <ip-address>
    tftp> status
    Connected to
    Mode: netascii Verbose: off Tracing: off
    Rexmt-interval: 5 seconds, Max-timeout: 25 seconds
    tftp> get test.txt
    Received 6 bytes in 0.0 seconds
    tftp> quit
  3. Remove test file from server
    # rm <TFTP_DIRECTORY>/test.txt