---
agent:
  instructions: "Use this search API to find relevant content across this site (products with prices and stock, collections, guides, articles, courses, help and pages) with keywords or natural-language queries, instead of crawling individual pages. Replace {query} with your URL-encoded query. Results are returned in Markdown."
  endpoint: "https://piaustralia.com.au/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Using a Raspberry Pi remotely

Control a Raspberry Pi from another computer. How to find its IP address, log in over SSH, see its desktop with VNC, and reach it from anywhere with Raspberry Pi Connect.

## Which method?

| Method | What you get | Works from |
|---|---|---|
| **SSH** | A command line on the Pi | Your home network |
| **VNC** | The Pi's desktop in a window | Your home network |
| **Raspberry Pi Connect** | The desktop or a command line, in a web browser | Anywhere with internet |

SSH and VNC are built into Raspberry Pi OS but both start switched off. The easiest time to turn on SSH is when you write the card with [Raspberry Pi Imager](/docs/raspberry-pi-imager), which can also set up Wi-Fi so a Pi with no screen joins your network on first boot.

## Finding the Pi on your network

For SSH and VNC you need the Pi's hostname or IP address.

**Try the hostname first.** Raspberry Pi OS announces itself on the local network, so you can usually use `<hostname>.local` in place of an IP address. The default hostname is `raspberrypi`, so:

```
ping raspberrypi.local
```

If it replies, the reply shows the IP address too. If you set a different hostname in Imager, use that.

**If that doesn't work**, find the IP address another way:

- **On the Pi's desktop:** hover over the network icon at the top right.
- **In a terminal on the Pi:** run `hostname -I`.
- **On a Pi with a screen but no desktop:** the address is shown just above the login prompt.
- **From your router:** log in to its admin page and look at the list of connected devices.
- **From a phone:** a network scanner app such as Fing lists every device, and the Pi shows "Raspberry Pi" as the maker.

It's worth giving the Pi a fixed address (a "DHCP reservation") in your router, so it doesn't change.

## SSH: the command line

### Turn it on

Choose one:

- **In Imager**, before writing the card: **Remote access > Enable SSH**.
- **On the desktop:** **Preferences > Control Centre > Interfaces**, set **SSH** to on, click **OK**.
- **In a terminal:** `sudo raspi-config`, then **Interface Options > SSH > Yes**.

### Connect

Windows 10 and later, macOS and Linux all include an SSH client. Open a terminal (PowerShell on Windows) and run:

```
ssh yourusername@raspberrypi.local
```

The first time, you'll be asked whether to trust the Pi's key; type `yes`. Then enter your password. A "connection timed out" error usually means the address is wrong. Type `exit` to log out.

### Log in without a password

An SSH key is more secure and saves typing your password. On your computer, make a key (press Enter to accept the defaults), then copy it to the Pi:

```
ssh-keygen -t ed25519
ssh-copy-id yourusername@raspberrypi.local
```

From then on, `ssh` logs straight in. Windows doesn't include `ssh-copy-id`; there, the simplest route is to let Imager put your public key on the card when you write it.

## VNC: the desktop

VNC shows the Pi's desktop in a window on your computer, with your mouse and keyboard. It needs Raspberry Pi OS with the desktop (not Lite).

### Turn it on

- **On the desktop:** **Preferences > Control Centre > Interfaces**, set **VNC** to on, click **OK**.
- **Over SSH:** `sudo raspi-config`, then **Interface Options > VNC > Yes**.

Raspberry Pi OS uses the WayVNC server.

### Connect

Install a VNC viewer on your computer. Raspberry Pi's instructions use **TigerVNC**, which is free for Windows, macOS and Linux. Then:

1. Type the Pi's IP address or hostname into the server field.
2. In the viewer's options, under **Input**, tick **Show dot when no cursor** so you can always see the pointer.
3. Click **Connect**, accept the certificate warning the first time, and log in with your Pi username and password.

## Raspberry Pi Connect: from anywhere

Raspberry Pi Connect is Raspberry Pi's own remote-access service. You sign in at connect.raspberrypi.com in any web browser and reach the Pi from there, whether it's on your home network or not. There's no IP address to find and no router settings to change. It's free for personal use.

It gives you two things:

- **Remote shell**: a command line in the browser, on any Pi.
- **Screen sharing**: the Pi's desktop in the browser. This needs the desktop version of Raspberry Pi OS running on Wayland, which is the default.

The connection is encrypted, and goes directly between your browser and the Pi where possible, or through a Raspberry Pi relay server when not. You'll need Raspberry Pi OS Bookworm or later, and a Raspberry Pi ID (a free account). Turn on two-factor authentication for that account, as it now guards your Pi.

### Turning it on from the desktop

Connect is installed on Raspberry Pi OS with the desktop. Click the Connect icon at the top right, choose **Turn On Raspberry Pi Connect**, then sign in with your Raspberry Pi ID and give the Pi a name. The icon turns blue once it's linked.

### Turning it on from the command line

Raspberry Pi OS Lite comes with the remote-shell-only version. If it's missing, install it:

```
sudo apt update
sudo apt install rpi-connect-lite
```

(Use `rpi-connect` for the full version on a desktop install.) Then start it and link it to your account:

```
rpi-connect on
rpi-connect signin
```

`signin` prints a web address. Open it on any device and sign in to approve the Pi. Check it with `rpi-connect status`.

Connect runs as part of your user session. On a Pi with no screen, run this once so it keeps running after a reboot without anyone logged in:

```
loginctl enable-linger
```

You can also link a Pi before its first boot by turning on Raspberry Pi Connect in Imager.

### Using it

Go to connect.raspberrypi.com, sign in and open **Devices**. Next to your Pi, choose **Connect via**, then **Screen sharing** or **Remote shell**.

To unlink a Pi, run `rpi-connect signout`, and remove it from the Devices list on the website.

Written by Pi Australia from Raspberry Pi's remote access documentation, Raspberry Pi Connect documentation.
