[toc]
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
- Do everything in this chapter as root or using sudo
- Install tftpd-hpa
# apt install tftpd-hpa
- Check configuration
# vim /etc/default/tftpd-hpa
The default configuration on Debian look like this
# /etc/default/tftpd-hpa TFTP_USERNAME="tftp" TFTP_DIRECTORY="/srv/tftp" TFTP_ADDRESS="0.0.0.0:69" TFTP_OPTIONS="--secure"
- Create a test file to tftp directory
# echo "test" > <TFTP_DIRECTORY>/test.txt
- Restart server if configuration is changed
# systemctl start tftpd-hpa
- Check status of server
# systemctl status tftpd-hpa
Test TFTP Server
- Install TFTP client.
Do it as root or using sudo.# apt install tftp
- Connect to server and download the test file
$ tftp <ip-address> tftp> status Connected to 192.168.13.137. 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
- Remove test file from server
# rm <TFTP_DIRECTORY>/test.txt