1 .\" $NetBSD: tftp.1,v 1.19 2006/07/23 17:52:24 jmcneill Exp $
3 .\" Copyright (c) 1990, 1993, 1994
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)tftp.1 8.2 (Berkeley) 4/18/94
37 .Nd trivial file transfer program
45 is the user interface to the Internet
47 (Trivial File Transfer Protocol),
48 which allows users to transfer files to and from a remote machine.
53 may be specified on the command line, in which case
59 as the default for future transfers (see the
65 argument sets a binary transfer mode as well as setting the extended options
73 The Multicast TFTP option is supported in open-loop (i.e., "slave-only") mode
74 based on IETF draft-dion-tftp-multicast-option-01.txt (May 2002), which in
75 turn was based on RFC2026.
79 is running, it issues the prompt
81 and recognizes the following commands:
83 .Bl -tag -width verbose -compact
84 .It Cm \&? Ar command-name ...
85 Print help information.
88 Shorthand for "mode ascii"
91 Shorthand for "mode binary"
93 .It Cm blksize Ar blk-size
94 Set the tftp blksize option to
96 octets (8-bit bytes). Since the number of blocks in a tftp
100 is 65535, the default block size of 512 bytes only allows a maximum of
101 just under 32 megabytes to be transferred. The value given for
103 must be between 8 and 65464, inclusive.
104 Note that many servers will not respect this option.
106 .It Cm connect Ar host-name Op Ar port
117 does not maintain connections between transfers; thus, the
119 command does not actually create a connection,
120 but merely remembers what host is to be used for transfers.
121 You do not have to use the
123 command; the remote host can be specified as part of the
129 .It Cm get Ar filename
130 .It Cm get Ar remotename localname
131 .It Cm get Ar file1 file2 ... fileN
132 Get a file or set of files from the specified
135 can be in one of two forms:
136 a filename on the remote host, if the host has already been specified,
137 or a string of the form
139 to specify both a host and filename at the same time.
140 If the latter form is used,
141 the last hostname specified becomes the default for future transfers.
143 .It Cm mode Ar transfer-mode
144 Set the mode for transfers;
154 .It Cm put Ar localfile remotefile
155 .It Cm put Ar file1 file2 ... fileN remote-directory
156 Put a file or set of files to the specified
157 remote file or directory.
159 can be in one of two forms:
160 a filename on the remote host, if the host has already been specified,
161 or a string of the form
163 to specify both a host and filename at the same time.
164 If the latter form is used,
165 the hostname specified becomes the default for future transfers.
166 If the remote-directory form is used, the remote host is
170 If you need to specify IPv6 numeric address to
172 wrap them using square bracket like
174 to disambiguate the colon.
179 An end of file also exits.
181 .It Cm rexmt Ar retransmission-timeout
182 Set the per-packet retransmission timeout, in seconds.
187 .It Cm timeout Ar total-transmission-timeout
188 Set the total transmission timeout, in seconds.
191 Toggle the tftp "timeout" option. If enabled, the client will pass its
192 .Ar retransmission-timeout
194 Note that many servers will not respect this option.
197 Toggle packet tracing.
200 Toggle the tftp "tsize" option. If enabled, the client will pass and
201 request the filesize of a file at the beginning of a file transfer.
202 Note that many servers will not respect this option.
212 IPv6 support was implemented by WIDE/KAME project in 1999.
213 TFTP options were implemented by Wasabi Systems, Inc., in 2003,
214 and first appeared in
216 Multicast TFTP was implemented by
218 in 2006, and first appeared in
220 .Sh SECURITY CONSIDERATIONS
221 Because there is no user-login or validation within
224 protocol, the remote site will probably have some
225 sort of file-access restrictions in place.
226 The exact methods are specific to each site and therefore
227 difficult to document here.