> For the complete documentation index, see [llms.txt](https://notes.lcsrg.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.lcsrg.me/home-setup/raspberry/first-access.md).

# Enable SSH and first access

By default, access via ssh is not enabled on your Raspberry. To change this, insert the SD card into your computer’s card reader, go to the root of the **boot** partition and place an empty file with the name **ssh**.&#x20;

```bash
touch ssh
```

Once this is done, insert the SD card back into the Raspberry and connect it to your LAN using an Ethernet cable.

## First access

Now, time to ssh into the raspberry for the first time! To do so, we need the private IP of the Raspberry, which you can find looking into your local network in the router preferences or using tools such as **Nmap**. Once known, you can ssh using the default credentials:

| field      | value     |
| ---------- | --------- |
| `user`     | pi        |
| `password` | raspberry |

{% hint style="info" %}
[Nmap](https://nmap.org/) is a free and open-source network scanner created by Gordon Lyo.
{% endhint %}

```bash
ssh pi@${PRIVATE_IP}
```

Once connected, [look for updates](https://howchoo.com/pi/update-raspberry-pi-raspbian).

```bash
sudo apt-get update
sudo apt-get upgrade --yes
```

Finally, restart your raspberry

```bash
sudo reboot
```
