---
name: Reverse SSH Tunnel to Mac
description: How to SSH from GCP VM to Arnav's MacBook Pro via reverse tunnel for ADB access
type: reference
---

Arnav's Mac (192.168.0.102) is behind a home router — VM can't reach it directly.

**Step 1 — Arnav runs on Mac:**
```bash
ssh -i ~/.ssh/gcp-key -R 2222:localhost:22 mail2arnav99@34.93.99.180 -N -f
```

**Step 2 — From VM:**
```bash
ssh -p 2222 asharma@localhost "<command>"
```

**ADB on Mac:** `/opt/homebrew/Caskroom/android-platform-tools/36.0.2/platform-tools/adb`

**Prerequisites:**
- Remote Login enabled on Mac (System Settings → General → Sharing)
- VM's ed25519 public key added to Mac's `~/.ssh/authorized_keys`
- Both already done as of 2026-03-24

**Gotcha:** Tunnel drops when Mac disconnects or sleeps. Must be re-established each time.
