Book Image

Raspberry Pi for Secret Agents - Third Edition

Book Image

Raspberry Pi for Secret Agents - Third Edition

Overview of this book

This book is for all mischievous Raspberry Pi owners who’d like to see their computer transform into a neat spy gadget to be used in a series of practical pranks and projects. No previous skills are required to follow along, and if you’re completely new to Linux, you’ll pick up much of the basics for free. We’ll help you set up your Raspberry Pi Zero, Raspberry Pi 2 and Raspberry Pi 3 and guide you through a number of pranks and secret agent techniques that are so inconspicuous yet high on mischief. You’ll learn how to configure your operating system for maximum mischief and start exploring audio, video, or Wi-Fi techniques. We’ll show you how to record, listen, or talk to people from a distance and how to set up your own phone network. Then, you’ll plug in your webcam and set up a motion detector with an alarm and find out what the other computers on your Wi-Fi network are up to. Once you’ve mastered the techniques, we’ll combine them with a battery pack and GPS for the ultimate off-road spy kit.
Table of Contents (7 chapters)

Setting up your Pi

When you boot into the shell and you have the Ethernet connected, hopefully, the Pi will have connected to your home network and will have acquired an IP address from your router. If this is the case, then you should see the IP address that has been issued just before the login prompt:

Setting up your Pi

As you can see from my screenshot, it's given me the IP address 192.168.0.118. This is good, because I can now access the Pi remotely using a secure shell (SSH) client to connect to it from the comfort of my laptop. This is particularly useful when my Pi is in the study and I want to sit on my sofa in front of the TV but still work on it, which I often do when I can't be bothered to go to my study.

To do this on Windows, download PuTTY—a utility that allows you to connect to shell terminals remotely over the network (see below if you're on Linux). You can download it from http://www.putty.org.

Install and launch PuTTY and you're ready to connect to your Pi remotely from the comfort of your sofa:

Setting up your Pi

Type the IP address of the Raspberry Pi into the Host Name box and click Open, and you'll be connected to your Pi in a remote terminal window. Once you've logged in, you can now do pretty much everything on you Pi as if you were sat in front of it:

Setting up your Pi

We'll assume from now on that most of the work we do will be through a remote shell session, unless otherwise highlighted.

If you want to use the command line to launch the Raspberry Pi remote shell, for example, from another Linux system, you use the following command from your terminal window (assuming your Pi has the IP address 192.168.0.120 in this case):

$ ssh [email protected]

You'll then be prompted for the Pi's password and taken into a shell session:

Setting up your Pi
Pi shell session launched from a Debian desktop terminal window