# K2Aley GAR-BOT - Raspberry Pi Zero 2 W SSH Setup

Copyright (c) 2026 K2Aley. GAR-BOT. All rights reserved.

Target board:

- Raspberry Pi Zero 2 W
- GAR-BOT transmitter IP: `192.168.0.161`

Current network check:

- The board answers ping on `192.168.0.161`.
- SSH port `22` is not open yet.
- SSH must be enabled from the Pi OS boot partition or from a local keyboard/screen.

## Fast SD Card Method

1. Shut down the Pi Zero 2 W.
2. Remove the microSD card.
3. Put the microSD card into this Windows PC or your Mac.
4. Open the small `bootfs` / `boot` partition.
5. Run one of the setup scripts in this folder.
6. Eject the card safely.
7. Put it back into the Pi Zero 2 W and boot it.
8. Connect:

```bash
ssh garbot@192.168.0.161
```

Use your chosen username if you select something other than `garbot`.

## Windows

Run PowerShell as your normal user:

```powershell
.\enable_ssh_windows.ps1 -BootDrive E: -Username garbot
```

Change `E:` to the drive letter of the Raspberry Pi boot partition.

The Windows script creates the required empty `ssh` file. If you already have a Pi user configured, that is enough.

For a brand-new Raspberry Pi OS image with no user account yet, use Raspberry Pi Imager to set the username/password, or run the Mac/Linux script below on a machine with `openssl passwd -6` available.

## Mac / Linux

From Terminal:

```bash
chmod +x enable_ssh_mac_linux.sh
./enable_ssh_mac_linux.sh /Volumes/bootfs garbot
```

The script prompts for the password and writes:

- `ssh`
- `userconf.txt`

`userconf.txt` contains a hashed password, not the plain text password.

## Local Console Method

If you have a screen and keyboard on the Pi Zero 2 W:

```bash
sudo raspi-config
```

Then select:

`Interface Options` -> `SSH` -> `Enable`

After enabling SSH:

```bash
sudo systemctl enable ssh
sudo systemctl start ssh
hostname -I
```

Then connect from this PC:

```powershell
ssh garbot@192.168.0.161
```
