![linux tftp 配置](https://i-blog.csdnimg.cn/blog_migrate/1b7a1d5e95e4d478c504917f19f5b493.png)
linux tftp 配置
Tftp (Trivial File Transfer Protocol) is a very simple client-server protocol used to transfer data and files over the network. Ftp is a very popular protocol but it has a lot of features that may not be needed always. Tftp is a lightweight alternative to Ftp protocol. We can say that Tftp is a featureless protocol because it only downloads and uploads files.
Tftp(私有文件传输协议)是一种非常简单的客户端-服务器协议,用于通过网络传输数据和文件。 Ftp是一种非常流行的协议,但是它具有很多不一定总是需要的功能。 Tftp是Ftp协议的轻型替代方案。 我们可以说Tftp是一种无功能的协议,因为它仅下载和上传文件。
- Tftp has no authentication or authorization mechanism. Tftp没有身份验证或授权机制。
- Tftp protocol does not have a file listing feature. Tftp协议没有文件列表功能。
- Tftp is clear text or not encrypted protocol Tftp是明文或未加密的协议
- Tftp is fast and simple to implementTftp易于实现
- TFTP uses generally UDPTFTP通常使用UDP
安装Tftp (Install Tftp)
The installation of Tftp tools is as simple as the protocol. As TFTP lightweight there is no dependency for other libraries.
Tftp工具的安装与协议一样简单。 由于TFTP轻量级,因此不依赖其他库。
Ubuntu,Debian,Mint,Kali: (Ubuntu, Debian, Mint, Kali:)
We will install tftp
for Debian, Mint, Ubuntu and Kali like below.
我们将为Debian,Mint,Ubuntu和Kali安装tftp
,如下所示。
$ apt install tftp
Fedora,CentOS,RedHat: (Fedora, CentOS, RedHat:)
We can install tftp
with the following command on Fedora, CentOS, RedHat.
我们可以在Fedora,CentOS,RedHat上使用以下命令安装tftp
。
$ yum install tftp
tftp命令语法 (tftp Command Syntax)
We will use following syntax for tftp
command in normal command-line usage.
在正常的命令行用法中,我们将对tftp
命令使用以下语法。
tftp HOST
tftp命令帮助 (tftp Command Help)
$ info tftp
![Tftp](https://i-blog.csdnimg.cn/blog_migrate/018e300988274e4ea998a448f234d9de.png)
从命令行连接TFTP服务器 (Connect TFTP Server From Command Line)
Connecting to the Tftp server is very easy. As stated at the beginning of the post Tftp does not have any authentication and authorization mechanisms. so Just providing the hostname of the server of IP address is enough to connect the Tftp server. In this example, we will connect 192.168.122.239
IP address.
连接到Tftp服务器非常容易。 如文章开头所述,Tftp没有任何身份验证和授权机制。 因此,只需提供IP地址服务器的主机名就足以连接Tftp服务器。 在此示例中,我们将连接192.168.122.239
IP地址。
$ tftp 192.168.122.239
![Connect](https://i-blog.csdnimg.cn/blog_migrate/5d07a852f2d8eb028e3db32d8ddf1637.png)
TFTP服务器命令行交互式外壳(TFTP Server Command Line Interactive Shell)
After connection to the Tftp server, we will get an interactive shell. In this shell, we will issue commands to get information about status of the connection, download or get files, upload, or put files to the server. We can list available commands provided by Tftp shell with ?
.
连接到Tftp服务器后,我们将获得一个交互式外壳。 在此shell中,我们将发出命令以获取有关连接状态的信息,下载或获取文件,上传文件或将文件放置到服务器。 我们可以用?
列出Tftp shell提供的可用命令?
。
?
![Interactive Shell](https://i-blog.csdnimg.cn/blog_migrate/ebab19198729533c5cd903f97f6c927d.png)
上传或放置文件到TFTP服务器(Upload or Put File To The TFTP Server)
We can upload or put files to the TFTP server with the put command. In the example, we upload a file named body.txt
我们可以使用put命令将文件上传或放置到TFTP服务器。 在示例中,我们上传了一个名为body.txt
的文件
put body.txt
从TFTP服务器下载或获取文件 (Download or Get File From TFTP Server)
We can also download or get files from the Tftp server to get command. In the example, we get a file named body.txt from the Tftp server.
我们还可以从Tftp服务器下载或获取文件以获取命令。 在该示例中,我们从Tftp服务器获得一个名为body.txt的文件。
get body.txt
显示TFTP连接状态 (Show TFTP Connection Status)
As TFTP works generally on the UDP protocol there is no session like TCP. But we can query current connection status with the status command. This status command will provide us information about the connected server IP address, current working mode, Rexmt-interval, Max-timeout, etc.
由于TFTP通常在UDP协议上工作,因此没有像TCP这样的会话。 但是我们可以使用status命令查询当前的连接状态。 此状态命令将向我们提供有关连接的服务器IP地址,当前工作模式,Rexmt间隔,最大超时等信息。
status
![Show Status](https://i-blog.csdnimg.cn/blog_migrate/bf7b5d2bbf4838f86e6f0c9ba0e77bab.png)
通过退出TFTP Shell与TFTP Server断开连接(Disconnect From TFTP Server by Exiting From TFTP Shell)
In order to quit from the Tftp shell we need to issue the q
command.
为了退出Tftp shell,我们需要发出q
命令。
![Quit From Shell](https://i-blog.csdnimg.cn/blog_migrate/3cd8e3faf7e02a301816d23ca6bf7603.png)
详细模式(Verbose Mode)
While making transfer we may need more information about the transmission. We can get more information about the transfer with the verbose
mode.
在进行传输时,我们可能需要有关传输的更多信息。 我们可以通过verbose
模式获得有关传输的更多信息。
verbose
![Verbose Mode](https://i-blog.csdnimg.cn/blog_migrate/9185b4e99aa9173dc8500d0b20a0c6a0.png)
翻译自: https://www.poftut.com/install-configure-run-linux-tftp-client/
linux tftp 配置