Ubuntu 16.04 install tftp

 

Ready to work

Create a new tftpdir service folder with 777 permissions

For example /home/sjj/work/tftpdir

Put a 1.txt text with content for testing

 

Install an enhanced version of tftp

Server tftpd-hpa 

client tftp-hpa

sudo apt-get install tftp-hpa tftpd-hpa

 

Modify the configuration file

sudo vim /etc/default/tftpd-hpa

 

The content is as follows

TFTP_USERNAME="tftp"

TFTP_DIRECTORY="/home/sjj/work/tftpdir"

TFTP_ADDRESS="0.0.0.0:69"

TFTP_OPTIONS="-l -c -s"

 

 

Then restart the tftpd-hpa service

sudo service tftpd-hpa restart

 

ps -ef |grep tftp can see the tftpd-hpa process and the service directory tftpdir

netstat -a | grep tftp successfully shows running

netstat -tlnup | grep :69 can display the port 69 we specified

 

 

have a test

Go back to other directories such as /home/sjj/work first, as long as it is not the tftpdir directory

tftp 127.0.0.1 或 tftp localhost

tftp> get 1.txt Get 1.txt in the tftpdir directory to the work directory

tftp> put 2.txt Send 2.txt of the current directory to the tftpdir server directory

tftp>q to quit

 

ok

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326376992&siteId=291194637