ubuntu tftp服务器

1 sudo apt-get install tftpd-hpa tftp-hpa


2.配置TFTP服务器


 mkdir ~/tftp

chmod 777 ~/tftp

cp test.c ~/tftp 



sudo vim /etc/default/tftpd-hpa

将原来的内容改为:

TFTP_USERNAME="tftp"

TFTP_ADDRESS="0.0.0.0:69"

TFTP_DIRECTORY="~/tftp"

TFTP_OPTIONS="-l -c -s"

3.重新启动TFTP服务

sudo service tftpd-hpa restart


4测试 

ifconfig  

 eth0      Link encap:以太网  硬件地址 8c:73:6e:b6:80:9a  
          inet 地址:192.168.1.134  广播:192.168.1.255  掩码:255.255.255.0
          inet6 地址: fe80::8e73:6eff:feb6:809a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  跃点数:1
          接收数据包:29922 错误:0 丢弃:0 过载:0 帧数:0
          发送数据包:16733 错误:0 丢弃:0 过载:0 载波:0
          碰撞:0 发送队列长度:1000 
          接收字节:21793196 (21.7 MB)  发送字节:1821218 (1.8 MB)

     cd 

     tftp 192.168.1.134

     get test.c

     quit

    在~目录下有test.c


    

发布了31 篇原创文章 · 获赞 11 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/Hsu_smile/article/details/43086927