Definitions and Applications of ftp commands

Source: Internet
Author: User
Tags ftp commands

FTP is a commonly used protocol. In some server settings, ftp commands are also used. This requires everyone to have a grasp of it. So here we will sort out and summarize it. I hope this will help you.

Security and Automatic Login 

If the "standard" is the current authentication method:

The ftp command also sends the password to the remote host for security and Permits automatic logon, file transfer, and logout.

If you execute the ftp command and specify the remote host name (HostName), the ftp command will try to establish a connection for the specified host. If the ftp command is successfully connected, the ftp command searches the local $ HOME/. netrc file in the current directory or main directory. If the file exists, the ftp command searches the file for the entry to start the logon process and searches for the remote host in the macro definition of the command. If the $ HOME/. netrc file or automatic logon item does not exist, or the system has been protected by the securetcpip command, the ftp command prompts the user to enter the user name and password. The command displays this prompt no matter whether the HostName parameter is specified in the command line.

Note: The queuing system does not support multi-byte host names.

If the ftp Command finds the $ HOME/. netrc Automatic Logon item of the specified host, ftp attempts to use the information in this logon item to log on to the remote host. The ftp command also loads any command macro defined in the logon item. In some cases, for example, the required password is not listed in the automatic logon option), the ftp command will prompt you to enter the password before displaying the ftp> prompt.

Once the ftp command completes automatic logon, if the macro is defined in the Automatic Logon item, the ftp command will execute the init macro. If the init macro does not exist or does not contain the quit or bye sub-command, the ftp command will display the ftp> prompt and wait for the sub-command.

Note: the remote host name specified in the prompt or in the $ HOME/. netrc file must exist and have the password defined in the remote host. Otherwise, the ftp command is invalid.

If Kerberos 5 is the current authentication method:

Ftp commands use this extension as defined in the IETF draft document "draft-ietf-cat-ftpsec-09.txt" for ftp specifications. The "Generic Security Service API (GSSAPI)" Security mechanism is used for FTP Security Extension. GSSAPI provides independent services for basic security and communication mechanisms. GSSAPI is defined in rfc 1508 and 1509.

The ftp command verifies the ftpd daemon by using the AUTH and ADAT commands. If both support Kerberos authentication, they use the local user DCE creden。 to authenticate users on the remote system. If this fails and both systems are configured with "standard" authentication, the above process will be used.

The HostName parameter is the name of the destination host for transferring files. The optional Port parameter specifies the Port identifier, which is used for transmission. The/etc/services file specifies the default port .)

Flag

-C allows users to specify that files sent through the send_file command must be cached in the network high-speed buffer area NBC. This flag must be used when the-q flag is specified. This flag is applicable only when files are sent in binary mode without protection.

-D sends debugging information about ftp command operations to the syslogd daemon. If you specify the-d flag, you must edit the/etc/syslog. conf file and add one of the following: user.info FileName OR user. debug FileName

Note: The debug level of the syslogd daemon contains information-level messages.

If the/etc/syslog. conf file is not edited, no message is generated. After the/etc/syslog. conf file is changed, run the refresh-s syslogd or kill-1 SyslogdPID command to notify the syslogd daemon of its configuration file changes. For more information about the debugging level, see the/etc/syslog. conf file. For more information, see debug subcommands.

-G: Disable metacharacter extension in the file name. For more information about how to interpret metacharacters, see "replace object names" for extensions. See the glob subcommand.

-I: Disable the interactive prompt in Multi-file transfer. Refer to the prompt, mget, mput, and mdelete subcommands to get the description of the prompt in Multi-file transfer.

-N prevents Automatic Logon during the initial connection. Otherwise, the ftp command searches for $ HOME/. netrc logon item, which describes the logon and initialization processes of the remote host. See user subcommands.

-Q allows users to specify that the send_file subroutine must be used to send files over the network. This flag is applicable only when files are sent in binary mode without protection.

-V displays all responses from the remote server and provides statistics on data transmission. When the ftp command output is to the terminal, such as the console or display), this display mode is the default mode. If stdin is not a terminal, the ftp details will be disabled unless you call an ftp command with the-v flag or send a verbose sub-command.

-F causes the forwarding credential. If Kerberos 5 is not the current authentication method, this flag is ignored.

-K realm if the remote site domain is different from the local system domain, the system allows the user to specify the remote site domain. Therefore, the domain is synonymous with the DCE unit. If Kerberos 5 is not the current authentication method, this flag is ignored.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.