How to Set Up Raspberry Pi with SSH and RealVNC (Headless Setup Guide)
Introduction
Setting up a Raspberry Pi for the first time without a monitor or keyboard? You're in the right place. In this guide, you'll learn how to configure your Raspberry Pi headlessly using SSH (Secure Shell) and RealVNC, allowing you to control your Pi remotely from your laptop or phone.
Whether you're building an IoT project, coding a robot, or just tinkering, this method saves time and space.
What You’ll Need
Raspberry Pi (any model with Wi-Fi support, e.g. Raspberry Pi 4 or 5)
microSD card (8GB or larger)
Card reader
Power supply for the Pi
Wi-Fi connection
Laptop or PC with Raspberry Pi Imager installed
Step 1: Flash Raspberry Pi OS to Your microSD Card
Download and install Raspberry Pi Imager from raspberrypi.com/software.
Insert your microSD card into your computer.
Launch the Imager and:
Choose Raspberry Pi OS (32-bit).
Select the SD card.
Click ⚙️ (Advanced Options) and preconfigure:
Enable SSH (use password or key-based login)
Set hostname
Configure Wi-Fi (SSID, password, country)
Set username and password
Click "Write" to flash and wait until it completes.
Step 2: Boot the Raspberry Pi
Insert the flashed SD card into your Raspberry Pi.
Power on the device using the appropriate power adapter.
Wait 1–2 minutes for it to boot and connect to the Wi-Fi network.
Step 3: Connect via SSH (Headless)
On your PC, open a terminal (Linux/macOS) or PowerShell (Windows).
Run:
ssh [email protected]
(Replace "pi" and "raspberrypi.local" with your custom username and hostname if configured)
Accept the SSH fingerprint prompt and enter your password.
You’re now inside your Raspberry Pi via SSH!
Step 4: Enable and Use RealVNC for Remote Desktop
RealVNC lets you access your Pi’s desktop GUI remotely.
Enable VNC on Raspberry Pi
Run:
sudo raspi-config
Navigate to:
Interface Options
VNC
Select Yes to enable
Install the RealVNC Viewer on your PC from realvnc.com.
Connect
Launch VNC Viewer.
Type:
raspberrypi.local
Use the same login credentials.
You’ll now see the Raspberry Pi desktop on your computer!
Expected Outcome
By the end of this guide, you’ll be able to:
Access your Raspberry Pi via terminal using SSH.
Access the desktop environment remotely with RealVNC.
Perform all configurations without connecting a monitor, mouse, or keyboard (headless setup).
Troubleshooting and Tips❌ Can't find hostname? Use your router's connected device list or a tool like
arp-scan
to find the Pi's IP address.🔒 SSH Refused? Ensure SSH was enabled correctly and that the Pi is on the same network.
📶 Wi-Fi not connecting? Double-check the SSID and password in Raspberry Pi Imager.
Conclusion
You’ve successfully configured your Raspberry Pi for remote access using SSH and RealVNC. This method streamlines future projects by making your Pi more accessible and portable.
👉 Next up: How to Control GPIO Pins Remotely via Python
Frequently Asked Questions
How to: How to Set Up Raspberry Pi with SSH and RealVNC (Headless Setup Guide)
Learn how to set up Raspberry Pi without a monitor using SSH and RealVNC. Follow this simple guide for a complete headless setup in minutes.
Required Supplies
- Arduino Board
- Jumper Wires
- Breadboard
- LED
- Resistor
Required Tools
- Arduino IDE
- USB Cable
- Computer
Steps
1Setup Development Environment
2Connect Hardware Components
3Write and Upload Code
4Test and Troubleshoot
Comments (0)
No comments yet. Be the first to comment!
Leave a Comment