FREE SHIPPING WITHIN THE USA
30-Day Easy Returns 30-Day Easy Returns
Secure Checkout Guaranteed Secure Checkout Guaranteed
Free Shipping in USA Free Shipping in USA

Your Cart 0 Items

Shipping: Free
Sub Total: $0.00

How to Remotely Access a Raspberry Pi

Oftentimes, a Raspberry Pi will be used as a server or perform some other function that requires it to be in an inconvenient location and/or to run headless, which is to say without a display attached. In such a case, it can be a hassle to get to the Pi, to connect a display, just to make some tweak or change to it.

Fortunately, there are ways to interact with the Pi without being in physical proximity to it or even having a keyboard, mouse, and display attached! Two of them are built into the Pi: SSH and VNC.

You can perform these interactions from a Mac, a PC, a Linux computer, another Raspberry Pi…even tablets and smartphones. Before we go any further, let’s make sure both SSH and VNC are activated on your Pi. If you followed the Basic Assembly Guide, they should already be turned on, but let’s check.

From the Raspberry Pi menu, open Control Center, then choose Interfaces. SSH and VNC are both at the top of the Interfaces window. If they are not turned on, turn them on now.

 

If you prefer using the command line, enter sudo rasp-config into Terminal, then choose Interface Options. In the next window, you’ll see options for both SSH and VNC. Choose them each in turn and activate the features.

In both cases, you may need to restart your Pi. The Pi will prompt you if a restart is necessary.

A. SSH

SSH (or secure shell) is a way to communicate with your Pi via the command line from another computer entirely. Once you’ve connected, the Terminal app on your computer interacts with the Pi exactly as though you were using the Terminal app on the Pi itself. As long as the two computers are on the same network, you can work on the Pi without physically interacting with it.

To login, you will need to know either the Pi’s IP address or its hostname. This is one reason why hostnames are so important — it’s easier and more reliable to use a hostname than to remember IP addresses.

Open the Terminal app on your Mac or PC and type ssh [YOUR USER NAME]@[HOSTNAME].local.

Your username was set up when you first flashed the Pi’s microSD card in the Basic Assembly Guide. If you don’t remember it, it’s easy enough to find — all the times you’ve been using Terminal commands on your Pi in this guide, you’ve seen something like this at the start of each line in the Terminal:

vilros@vilros-server.local

vilros-server.local is the hostname. The part before the at-mark is the username. So in this case, to initiate an SSH session, we would type: ssh vilros@vilros-server.local.

The system will then ask for your password. When you type it in, the cursor will not move and there will be no indication you’re typing. This is a security measure; don’t be concerned.

Once you’ve entered your password, you will be given access to your Pi. From here you can do anything with and to the Pi that you would normally do via the Terminal on the Pi itself.

B. VNC

SSH is great if you’re comfortable with or only need the command line. But what if you want to interact with the Pi through its desktop GUI? Fortunately, there is a way to do so without a display, keyboard, or mouse connected to your Pi: VNC (virtual network computing).

Like SSH, VNC lets you control your Pi from another computer. Unlike SSH, you do so through the Pi’s desktop GUI, not the command line.

There are two components to VNC: the server and the viewer. The server is the component on your Pi that you’ve already activated. It broadcasts that your Pi is available for a VNC connection. The viewer is software on your other computer that connects you to the server on your Pi. The viewer opens a window on your computer that shows you your Pi’s desktop — it’s like having a portal from one computer to the other.

There are a number of VNC viewers on the market. Some are free and some are paid. Depending on which device you plan to use to VNC into your Pi, there will be features and functions you may or may not be willing to pay for. Since there are so many available viewers, it is impossible for us to recommend which would be best for you — we suggest investigating whether there is already a viewer built into your device and, if not, looking into the App Store for your platform, searching VNC Viewer.