# TCP 21: FTP

> The File Transfer Protocol is a standard network protocol used for the transfer of computer files between a client and server on a computer network. FTP is built on a client-server model architecture using separate control and data connections between the client and the server.
>
> \-- [*Wikipedia*](https://en.wikipedia.org/wiki/File_Transfer_Protocol)

## Commands

Connect

```bash
ftp <ip>
```

Show all files

```bash
dir -a
```

Use binary mode for file transfers

```bash
binary
```

Download file

```bash
get <file>
```

Upload file

```bash
put <localfile>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://d4rk1337.gitbook.io/the-pentesters-cheat-sheet/services/tcp/tcp-21-ftp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
