ftp - Transfers files between a local and a remote host
ftp [-dginptvx] [host]
The following options can be entered on the shell command
line. (The ftp command equivalents can also be entered at
the ftp> prompt.) Enables debugging by turning on the
logging feature. See the debug subcommand. Disables the
expansion of metacharacters in filenames. Interpreting
metacharacters may be referred to as expanding (sometimes
called globbing) a filename. See the glob subcommand.
Disables interactive prompting during multiple file transfers.
See the prompt, mget, mput, and mdelete subcommands
for descriptions of prompting during multiple file transfers.
Prevents an automatic login on the initial connection.
Otherwise, ftp searches for a $HOME/.netrc entry
that describes the login and initialization process for
the remote host. See the user subcommand. Enables the
interpretation of the vertical bar (|) as a pipe symbol
when it is the first character in a file name. See the
pipe subcommand. Toggles packet tracing (see trace subcommand).
Displays all the responses from the remote
server and provides data transfer statistics. This is the
default display mode when the output of the ftp command is
to a device, such as the console or a display. However,
if output is redirected, such as through a pipe or to a
file, or if the ftp command is started by a daemon, such
as the cron daemon, verbose mode is not in effect unless
the -v option or the verbose subcommand is used. See the
verbose subcommand. Encrypts the data transmitted between
the local host and the remote host. This option requires
that the local and remote hosts be configured to use Kerberos
authentication in the same or trusting Kerberos
realms.
The ftp command is the interface to the File Transfer Protocol
(FTP). The FTP protocol allows transferring data
between hosts that use dissimilar file systems.
Although the protocol provides a lot of flexibility for
transferring data, it does not attempt to preserve file
attributes that are specific to a particular file system
(for example, the protection mode or modification times of
a file). Additionally, the FTP protocol makes few assumptions
about the overall structure of a file system and
does not provide or allow such things as recursively copying
subdirectories.
Note that if you are transferring files between Tru64 UNIX
systems (or other systems compatible with the UNIX operating
system) and need to preserve file attributes or need
to recursively copy subdirectories, you can use the rcp
command.
The ftp command provides subcommands for tasks such as
listing remote directories, changing the current local and
remote directory, transferring multiple files in a single
request, creating and removing directories, and escaping
to the local shell to perform shell commands.
If you execute the ftp command and do not specify a hostname,
the ftp> prompt displays and waits for an ftp subcommand.
To connect to a remote host, you then execute
the open subcommand. If you do specify the name of a
remote host, ftp immediately tries to establish a connection
to the specified host.
The way in which the remote host authenticates a user and
transmits data depends on if the local and remote hosts
are using a basic connection or a secure connection (Kerberos
or Secure Shell). Basic and secure connections provide
user authentication; however, a secure connection
also provides client and server authentication, data
encryption, data integrity, and nonrepudiation.
Basic Connection [Toc] [Back]
A basic connection is one where the ftp command connects
to the remote host, then prompts for the username and
password before displaying the ftp> prompt again. The ftp
command fails if no password is defined at the remote host
for the specified username.
If ftp connects successfully, ftp searches for a local
$HOME/.netrc file in your current directory or home directory.
If the file exists, ftp searches the file for an
entry that initiates the login process and command macro
definitions for the remote host. If the $HOME/.netrc file
or autologin entry does not exist, ftp prompts you for a
username and password. This occurs whether or not the
hostname is entered on the command line.
If ftp finds a $HOME/.netrc autologin entry for the specified
host, ftp attempts to use the information in that
entry to automatically log in to the remote host. The ftp
command also loads any command macros defined in the
entry. In some cases (for example, when the required
password is not listed in an autologin entry), ftp prompts
for the password before displaying the ftp> prompt.
After ftp completes the autologin process, ftp executes
the init macro if the macro is defined in the autologin
entry. If the init macro does not exist or does not contain
a quit or bye command, ftp then displays the ftp>
prompt and waits for a subcommand.
The remote username that you specify either at the prompt
or in a $HOME/.netrc file must exist and have a password
defined at the remote host or ftp fails. In addition, the
remote user's shell must be listed in the /etc/shells
file.
Secure Connection [Toc] [Back]
A secure connection is one where the ftp command connects
to the remote host by using either Kerberos or Secure
Shell. Kerberos and Secure Shell are client/server applications
that authenticate the client, server, and user;
encrypt data; and ensure data integrity and nonrepudiation.
See your system administrator to determine if your
system is running Kerberos or Secure Shell software. See
Security Administration for more information about Kerberos
and Secure Shell.
Kerberos [Toc] [Back]
Kerberos authenticates by using secret-key cryptography
and tickets between Kerberos clients and Kerberos servers
in the same or trusting Kerberos realms. Once authenticated
by Kerberos, users receive a Kerberos Ticket Granting
Ticket (TGT). Users with a valid TGT are not prompted
for a username or password when the remote host is in the
same or trusting Kerberos realm.
To use Kerberos to execute a command or log in to a remote
host, enter the ftp command with the -x option.
Secure Shell [Toc] [Back]
Secure Shell authenticates by using passwords, host-based
identification, or public and private keys between Secure
Shell clients and Secure Shell servers.
By default, the ftp command will use Kerberos (with a
valid TGT) when a system is configured to use both Kerberos
and Secure Shell.
To use Secure Shell to transfer files between a local and
a remote host, enter the Secure Shell sftp2 (or sftp) command
instead of the ftp command. The sftp2 command provides
the same functionality and options as the ftp command
over a secure connection. See sftp2(1) for more
information on using the Secure Shell sftp2 command.
After it is determined that Secure Shell will be used, all
authentication and communication between the client and
server will use the Secure Shell connection. A connection
is not established if a user cannot be authenticated.
TYPE-OF-SERVICE VALUES [Toc] [Back] The ftp command uses the default Type-of-Service values
recommended by RFC1060, which are as follows: Low delay
High throughput
You can configure these values by specifying them in the
/etc/iptos file. For more information, see iptos(4).
The ftp command interpreter, which handles all commands
entered at the ftp> prompt, provides facilities that are
not available with most file transfer programs, such as:
the handling of filename arguments to ftp commands, the
ability to collect a group of commands into a single command
macro, and the ability to load macros from a
$HOME/.netrc file. These facilities are designed to allow
simplifying repeated tasks and to allow using ftp in unattended
mode.
The command interpreter handles filename arguments according
to the following rules: If a - (dash) is specified for
the argument, standard input is used for read operations
and standard output is used for write operations. If the
first character of the filename is a vertical bar (|), the
remainder of the argument is interpreted as a shell command.
The ftp command then forks a shell, using popen()
with the argument supplied, and reads (writes) from stdout
(stdin). By default, this feature is disabled. Failing
the above checks, if globbing is enabled, local filenames
are expanded according to the rules used in csh; c.f., the
glob command. If the ftp command expects a single local
file (for example, put), only the first filename generated
by the globbing operation is used. For get and mget subcommands
with unspecified local filenames, the local filename
is the same as the remote filename, which may be
altered by a case, ntrans, or nmap setting. The resulting
filename can then be altered if runique is on. For mput
commands and put commands with unspecified remote filenames,
the remote filename is the same as the local filename,
which can be altered by a ntrans or nmap setting.
The resulting filename can then be altered by the remote
server if sunique is on.
Note that the ftp command interpreter does not support
pipes.
When you make the initial request to transfer data, ftp
attempts to determine which underlying command set the
remote server supports. The ftp command supports the following
command sets: PORT and PASV -- For IPv4 networks
LPRT and LPASV -- For IPv6 networks EPRT and EPASV -- For
both IPv4 and IPv6 networks After ftp determines the command
set, it uses the command set for all subsequent data
exchanges during the session.
ABORTING A FILE TRANSFER [Toc] [Back] To abort a file transfer, use the Interrupt key sequence
(often Ctrl-c>, which can be redefined with the stty command.)
Sending transfers (those from the local host to the
remote host) are normally halted immediately. Receiving
transfers are halted by sending an FTP ABOR instruction to
the remote FTP server and discarding all incoming file
transfer packets until the remote server stops sending
them. The speed at which this is accomplished depends upon
the remote server's support for ABOR processing. If the
remote server does not support the ABOR command, the
prompt ftp> does not appear until the remote server has
completed sending the requested file. The Interrupt key
sequence is ignored when ftp has completed any local processing
and is awaiting a reply from the remote server. A
long delay in this mode may result from the ABOR processing
described above, or from unexpected behavior by the
remote server, including violations of the FTP protocol or
non support for the ABOR instruction. If the delay
results from unexpected remote server behavior, the local
ftp program must be stopped manually.
The following ftp subcommands can be entered at the ftp>
prompt. If an argument for a subcommand includes spaces,
enclose the argument within (double quotes). Invokes an
interactive shell on the local host. An optional command,
with one or more optional arguments, can be specified.
Executes the specified macro, previously defined with the
macdef subcommand. Arguments are not expanded. See the
macdef subcommand for further information. Displays a
help message describing the subcommand. If you do not
specify subcommand, ftp displays a list of known subcommands.
Sends a supplemental password that a remote host
may require before granting access to its resources. If
the password is not supplied with the command, you are
prompted for the password. The password does not appear on
the screen. Appends a local file to a file on the remote
host. If the remote filename is not specified, the local
filename is used, altered by any setting made with the
ntrans or nmap subcommand. The append subcommand uses the
current values for form, mode, struct, and type while
appending the file. For more information on these subcommands,
see their individual descriptions. Sets the file
transfer type to network ASCII. This ft command is the
default when ftp cannot determine that the remote system
is a UNIX system. File transfer may be more efficient with
binary-image transfer. Sounds a bell after the completion
of each file transfer. Sets the file transfer type to
binary image, by default, if ftp can determine that the
remote system is a UNIX system. This can be more efficient
than an ASCII transfer. Ends the File Transfer session
and exits ftp. Same as quit. Sets a toggle for the case
of filenames. When case is on, remote filenames that
appear in all capital letters are changed from uppercase
to lowercase when written in the local directory. The
default is off (uppercase remote filenames are written in
uppercase in the local directory). Changes the remote
working directory to the specified directory. Changes the
working directory on the remote host to the parent of the
current directory. Ends the File Transfer session, but
does not exit ftp. Defined macros are erased. Same as
disconnect. Strips the carriage-return character from a
carriage-return/linefeed sequence when receiving records
during ASCII-type file transfers. (The ftp command terminates
each ASCII-type record with a carriage-return/linefeed
sequence during file transfers.) This conforms with
the Tru64 UNIX and UNIX system convention for terminating
records with a single linefeed. Records on remote hosts
that have different record termination conventions may
have single linefeeds imbedded in records. To distinguish
these imbedded linefeeds from record delimiters, set cr to
off. The cr subcommand toggles between on and off.
Deletes the specified remote file. Prints each command
sent to the remote host preceded by the string --> when
debug on is specified. Writes a listing of the contents
of remote_directory to the file local_file. If
remote_directory is not specified, dir lists the contents
of the current remote directory. If local_file is not
specified or is a - (dash), dir displays the listing on
the local terminal. See close. Requests the server to
disallow all data commands except EPSV (Extended Passive
Mode). Specifies the form of the file transfer. The only
format available is non-print. Copies the remote file to
the local host. If local_file is not specified, the
remote filename is used locally and is altered by any settings
made by the case, ntrans, and nmap subcommands. The
ftp command uses the current settings for type, form,
mode, and struct while transferring the file. For additional
information, refer to the description of each of
these subcommands. Toggles filename expansion (globbing)
for mdelete, mget, and mput. If globbing is off, filename
arguments for these subcommands are not expanded. When
globbing is enabled and a pattern-matching character is
used in a subcommand that expects a single filename,
results may be different than expected. For example, the
append and put subcommands perform filename expansion and
then use only the first filename generated. Other ftp subcommands,
such as cd, delete, get, mkdir, rename, and
rmdir, do not perform filename expansion and take the pattern-matching
characters literally. Globbing for the mput
subcommand is done locally in the same way as for the csh
command. For mdelete and mget, each filename is expanded
separately at the remote machine and the lists are not
merged. The expansion of a directory name may be different
than the expansion of a filename, depending on the
remote host and the ftp server. To preview the expansion
of a directory name, use the mls subcommand: mls
remote_file -
To transfer an entire directory subtree of files,
transfer a tar archive of the subtree in binary
form, rather than using mget or mput. Toggles #
(hash sign) printing. When hash is on, ftp displays
one hash sign for each data block (8192
bytes) transferred. Displays help information.
Refer to the ? subcommand. See binary. Changes
the working directory on the local host. If you do
not specify a directory, ftp uses your home directory.
Writes an abbreviated file listing of a
remote directory to a local file. If remote_directory
is not specified, ftp lists the current remote
directory. If local_file is not specified or is a
- (dash), ftp displays the listing on the local
terminal. Defines a subcommand macro. Subsequent
lines up to a null line (two consecutive linefeeds)
are saved as the text of the macro. Up to 16
macros containing at most 4096 bytes for all macros
can be defined. Macros remain defined until redefined
or a close is executed.
The special characters $ (dollar sign) and \ (backslash)
have special uses in ftp macros. A $ followed
by one or more numbers is replaced by the
corresponding macro parameter on the invocation
line (refer to the $ subcommand). A $ followed by
an i indicates that the macro is to loop, with $i
being replaced by consecutive parameters on each
pass. The first macro parameter is used on the
first pass, the second parameter is used on the
second pass, and so on. A \ prevents special
treatment of the next character. Use the \ to turn
off the special meanings of $ and \. Expands
remote_files and deletes the indicated remote
files. Expands remote_directory at the remote host
and writes a listing of the contents of the
remote_directory to the local_file. If the
remote_directory argument contains a pattern-matching
character, mdir prompts for a local_file if
none is specified. If the remote_directory argument
is a list of remote directories, separated by
spaces, the last argument in the list must be
either a local filename or a - (dash). If
local_file is -, mdir displays the listing on the
local terminal. If interactive prompting is on
(refer to the prompt subcommand), ftp prompts you
to verify that the last argument is a local file
and not a remote directory. Expands remote_files
at the remote host and copies the indicated remote
files to the current directory on the local host.
Refer to the glob subcommand for more information
on filename expansion. The remote filenames are
used locally and are altered by any settings made
by the case, ntrans, and nmap subcommands. The ftp
command uses the current settings for type, form,
mode, and structure while transferring the files.
Refer to the description of each of these subcommands
for additional information. Creates the
directory remote_directory on the remote host.
Expands remote_directory at the remote host and
writes an abbreviated file listing of the indicated
remote directories to a local file. If the
remote_directory argument contains a pattern-matching
character, mls prompts for a local_file if none
is specified. If the remote_directory argument is
a list of remote directories, separated by spaces,
the last argument in the list must be either a
local filename or a - (dash). If local_file is -,
mls displays the listing on the local terminal. If
interactive prompting is on (refer to the prompt
subcommand), ftp prompts you to verify that the
last argument is a local file and not a remote
directory. Sets file transfer mode. The only mode
available is stream. Shows the last modification
time of file on the remote machine. Expands
local_file at the local host and copies the indicated
local files to the remote host. Refer to the
glob subcommand for more information on filename
expansion. The local filenames are used at the
remote host and are altered by any settings made by
the ntrans and nmap subcommands. The ftp command
uses the current settings for type, form, mode, and
structure while transferring the files. Refer to
the description of each subcommand for additional
information. Prints a list of the files of a
directory on the remote machine. If remote_directory
is left unspecified, the current working
directory is used. If interactive prompting is on,
ftp prompts the user to verify that the last argument
is indeed the target local file for receiving
nlist output. If no local file is specified, the
output is sent to the terminal. Sets or unsets the
filename mapping mechanism. If no arguments are
specified, filename mapping is turned off. If
arguments are specified, source filenames are
mapped for mget and mput operations and for get and
put operations when the destination filename is not
specified. This subcommand is useful when the
local and remote hosts use different filenaming
conventions or practices. Mapping follows the pattern
set by inpattern and outpattern.
The inpattern variable specifies the template for
incoming filenames, which may have already been
processed according to the case and ntrans settings.
The template variables $1 through $9 can be
included in inpattern. All characters in inpattern
other than $ and protected $s (that is, \$) define
the values of the template variables. For example,
if the inpattern is $1.$2 and the remote filename
is mydata.dat, the value of $1 is mydata and the
value of $2 is dat.
The outpattern variable determines the resulting
filename. The variables $1 through $9 are replaced
by their values as derived from inpattern and the
variable $0 is replaced by the original filename.
Additionally, the sequence [sequence1,sequence2] is
replaced by the value of sequence1 if sequence1 is
not null; otherwise, it is replaced by the value of
sequence2. For example, the following subcommand
would yield myfile.data from myfile.data or
myfile.data.old, myfile.file from myfile, and
myfile.myfile from nmap $1.$2.$3 [$1,$2].[$2,file]
Spaces can be included in outpattern. Use the \
(backslash) character to prevent the special meanings
of $, [, ], and , (comma) in outpattern. Sets
or unsets the filename character translation mechanism.
If no arguments are specified, character
translation is turned off. If arguments are specified,
characters in source filenames are translated
for mget and mput operations and for get and put
operations when the destination filename is not
specified. This subcommand is useful when the
local and remote hosts use different file naming
conventions or practices. Character translation
follows the pattern set by in_characters and
out_characters. Characters in a source filename
matching characters in in_characters are replaced
by the corresponding characters in out_characters.
If the string in_characters is longer than the
string out_characters, characters in in_characters
are deleted if they have no corresponding character
in out_characters.
The maximum number of characters allowable on an
ftp command line is 255. Therefore, the maximum
number of in_characters and out_characters is 248.
Establishes a connection to the FTP server at the
specified host. If the optional port number is
specified, ftp will attempt to connect to a server
at that port. If the autologin feature is set
(that is, -n was not specified on the command
line), ftp will attempt to automatically log you in
to the FTP server. You must also have a
$HOME/.netrc file with the correct information in
it and the correct permissions set. Toggles the
interpretation of the vertical bar (|) as the pipe
symbol when it is the first character in a file
name. If the interpretation is off (the default),
the vertical bar is interpreted as a regular
character and has no special meaning. Otherwise,
the vertical bar (|) indicates that the remainder
of the argument is interpreted as a shell command.
Toggles interactive prompting. If interactive
prompting is on (the default), ftp will prompt for
verification before retrieving, sending, or deleting
multiple files during mget, mput, and mdelete
operations. Otherwise, ftp will perform the operation
on all files specified. Executes an ftp command
on a secondary control connection. This subcommand
allows ftp to simultaneously connect to two
remote FTP servers for transferring files between
the two servers. To establish the secondary control
connection, specify open as the first proxy
subcommand. Enter the subcommand proxy ? to see
the other ftp subcommands that are executable on
the secondary connection. The following subcommands
behave differently when prefaced by proxy:
The open subcommand does not define new macros during
the autologin process. The close subcommand
does not erase existing macro definitions. The get
and mget subcommands transfer files from the host
on the primary connection to the host on the secondary
connection. The put, mput, and append subcommands
transfer files from the host on the secondary
connection to the host on the primary connection.
If you want transfer files between two
servers that support the EPSV/EPORT command set, do
the following: Open your primary connection. Proxy
open your secondary connection. Perform file
transfer operations, server to localhost and server
to server. If you perform a file transfer operation
between the remote system and the local system
before opening the proxy connection, the following
informational message is displayed: Data exchange
limited to EPSV. Proxy exchange disabled.
In this case, if you then open the proxy connection
and attempt to transfer files between the two
servers, the transfer fails and the following message
is displayed: 501 Invalid command after EPASV
ALL Stores a local file on the remote host. If you
do not specify remote_file, ftp uses the local
filename to name the remote file, and the remote
filename is altered by any settings made by the
ntrans and nmap subcommands. The ftp command uses
the current settings for type, form, mode, and
structure while transferring the files. Refer to
the description of each subcommand for additional
information. Displays the name of the current
directory on the remote host. Ends the file transfer
session and exits ftp. A synonym for bye.
Sends the specified string verbatim to the remote
host. Unpredictable results can occur when you
quote commands that involve data transfers. Copies
the remote file to the local host. A synonym for
get. Acts like get, except that if local_file
exists and is smaller than remote_file, local_file
is presumed to be a partially transferred copy of
remote_file and the transfer is continued from the
apparent point of failure. This subcommand is useful
when transferring very large files over networks
that are prone to dropping connections.
Requests help from the remote FTP server. Renames
a file on the remote host. Clears the reply queue.
This command resynchronizes the command parsing.
Restarts the immediately following get or put at
the indicated marker. On systems that treat files
as unstructured byte arrays (such as Tru64 UNIX and
other UNIX systems), marker is simply a byte offset
into the file. Requests help from the remote FTP
server. If a command name is specified, it is also
sent to the server. Removes the directory
remote_directory at the remote host. Shows the
status of the remote machine. If you specify a file
name, the command shows the status of filename on
the remote machine. Toggles whether unique filenames
are created for local destination files during
get and mget operations. If creating unique
local filenames is not enabled (the default), ftp
overwrites local files. Otherwise, if a local file
has the same name as specified for a local destination
file, ftp modifies the specified name of the
local destination file with name, ftp appends the
postfix to the specified name. If a local file is
already using this second name, ftp continues
incrementing the postfix until it either finds a
unique filename or reaches without finding a unique
name. If ftp cannot find a unique name, ftp
reports an error and the transfer does not take
place. Note that runique does not affect local
filenames generated from a shell command. Stores a
local file on the remote host. A synonym for put.
Toggles the use of FTP Port instructions. By
default, ftp uses either a PORT instruction (for
IPv4 addresses), a LPRT instruction (for IPv6
addresses), or a EPRT instruction (for either IPv4
or IPv6 addresses) when establishing a connection
for each data transfer. When the use of Port
instructions is disabled, ftp does not use Port
instructions for data transfers. The Port instructions
are useful when dealing with FTP servers that
ignore Port instructions while incorrectly indicating
they were accepted. Sends the arguments, verbatim,
to the remote FTP server as a SITE command.
Returns the size of file on the remote machine in
bytes. Displays current status of ftp. Sets data
transfer structure type. The only structure supported
is file. Toggles whether unique filenames
are created for remote destination files during put
and mput operations. If creating unique remote
filenames is not enabled (the default), ftp overwrites
remote files. Otherwise, if a remote file
has the same name as specified for a remote destination
file, the remote FTP server modifies the
name of the remote destination file. Note that the
remote server must support the STOU instruction.
Shows the type of operating system running on the
remote machine. Sets the file transfer type to
that needed for TENEX machines. Toggles packet
tracing. Sets the file transfer type to type. If
type is not specified, the current type is printed.
The default type is ASCII. Identifies the local
user as user to the remote FTP server. If password
or account is not specified and the remote server
requires it, ftp prompts for it locally. If
account is required, ftp sends it to the remote
server after the remote login process completes.
Note that, unless autologin is disabled by specifying
-n on the command line, this process is done
automatically for the initial connection to the
remote server. You also need a $HOME/.netrc file in
your home directory to issue an autologin. Toggles
verbose mode. When verbose mode is on (the
default), ftp displays all responses from the
remote FTP server. Additionally, ftp displays
statistics on all file transfers when the transfers
are completed.
This example shows how user smith, who is logged in on
host1, can log in on the remote host host2, check the current
working directory on host2 and list its contents,
transfer a file, and then end the session. $ ftp host2
If the connection to host2 is successful, a verification
message is displayed on the local system:
Connected to host2.abc.org 220 host2 FTP server
(Version ...) ready. Name (host2:smith): smith
Password:
Enter your name and password when prompted by the
system. A message similar to the following is then
displayed on your local system: 230 User smith
logged in
ftp> _
To set the file transfer type to binary, enter the
binary subcommand after the ftp> prompt: ftp>
binary
A message similar to the following is displayed on
your local system: 200 Type set to I
To check the current working directory, enter the
pwd command after the ftp> prompt: ftp> pwd
A message similar to the following is displayed on
your local system: 257 "u/smith" is current directory
To list the contents of the current working directory,
enter the ls command after the ftp> prompt:
ftp> ls
A message similar to the following is displayed on
your local system: 200 PORT command successful.
150 Opening data connection for /usr/bin/ls
(555.5.55.555) (0 bytes) printfile testfile
226 Transfer complete.
(The Opening data connection message appears on one
line, not on two lines as shown above.)
To transfer a file from the remote host to the
local host, enter the get or mget subcommand following
the ftp> prompt: ftp> get testfile tmp.testfile
A message similar to the following is displayed on
your local system: 200 PORT command successful.
150 Opening data connection for testfile
(555.5.55.555) (1201 bytes) 226 Transfer
complete. local:tmp.testfile remote:testfile
(The Opening data connection message appears on one
line, not on two lines as shown above.)
To end the ftp session, enter the quit subcommand
after the ftp> prompt: ftp> quit 221 Goodbye. $ _
This example shows how user smith, who is logged in
on host1, can log in as the user smith on the
remote host host2: $ ftp host2
Connected to host2.abc.org 220 host2 FTP server
(Version ...) ready. Name (host2:smith): 331
Passwd required for smith Password: 230 User smith
logged in ftp> This example shows the results when
user smith makes a typing error: $ ftp test
Connected to test.abc.org 220 test FTP server (Version
...) ready. Name (test:fred): msith 530 User
msith unknown ftp> user smith 331 Passwd required
for smith Password: 230 User smith logged in ftp>
This example shows user fred entering the ftp command
without specifying a hostname, then connecting
to host1 using the open subcommand: $ ftp ftp> open
host1
Connected to host1.abc.org 220 host1 FTP server
(Version ...) ready. Name (host1:fred): 331 Passwd
required for fred Password: 230 User fred logged in
ftp> This example shows user smith, who is logged
into host1, connecting to a remote host named
host2 in the same Kerberos domain using encryption:
$ ftp -x host2
Connected to host2.abc.org. 220 host2.abc.org FTP
server (Version ...) ready. 334 Using authentication
type KERBEROS_V5; ADAT must follow KERBEROS_V5
accepted as an authentication type Kerberos V5
authentication succeeded P:200 Protection level set
to Private. Name (host2:smith): P:231 Kerberos
user [email protected] is authorized as smith
P:230 User smith logged in. Remote system type is
UNIX. Using binary mode to transfer files.
Contains automatic login information.
Commands: csh(1), kdestroy(1), kinit(1), klist(1),
rcp(1), sftp2(1), stty(1), tftp(1), ftpd(8)
Functions: popen(3)
Files: iptos(4), netrc(4)
Guides: Security Administration
ftp(1)
[ Back ] |