Copying a file from a local host to a remote host

Use the ftp command to copy a file from a local host to a remote host.

To copy a file from a local host to a remote host using the ftp command, you must first log in to the remote system either directly or indirectly. See Logging in to a remote host directly or Logging in to a remote host indirectly for instructions.

Note: The ftp command uses the ASCII default transfer type to copy files.

To copy a file from a local host to a remote host:

  1. If you want to place the file in a directory other than the $HOME directory, use the cd subcommand to move to the desired directory.
  2. To copy your local file using binary image, type:
    binary
  3. To copy a file to the remote host, type:
    put FileName
  4. To end the session, press the Ctrl-D key sequence, or type quit.