Intro
Part I : Documenting the workflow/steps to setup my Raspberry Pi (2 B) – from Installing Raspbian to installing Node, Processing etc
Goals:
- Enable SSH service on the Pi
- Connect to Pi without a display or router – headless access via Mac

Steps
- Install Raspbian
- Boot your Pi
- Setup SSH
- Connect to Mac
- Troubleshoot Connection to Mac
- Install Node
- Install Processing
Install Raspbian
You can download it here https://www.raspberrypi.org/downloads/raspbian/
Boot Pi
Use the Raspbian image to boot-up the pi and you should see a command shell (once you have connected your pi to a display ofcourse!)
Setup SSH
Start with typing the following command in your shell
sudo raspi-config
This launches the Config Tool UI, follow the screenshots below
Test by SSH’ing into the pi from the pi
ssh pi@localhost
Copy Network Card’s Address
Do an “ifconfig” in the Pi’s shell and note down the “HWaddr” … we will use this later to search for the IP assigned by Mac
ifconfig
Connect to Mac Headless
Next we will connect the Pi to the in “headless” mode using the Mac to assign an IP to the Pi and then SSH into the Pi from a terminal in Mac …
- Ensure your Mac is connected to the network (wifi)
- On the Mac goto System Preferences -> Sharing
- Connect Pi to Mac via Ethernet Cable and then power it up
- Wait until the “green lights” on the Pi have stopped blinking
- Check connection using the following command
- See Routing Table with the following command
netstat -rn -finet
- Your Pi’s IP should be in the 1st column, next to the “HWaddr” in the 2nd column
- If you do not see your “HWAddr” listed then there is some connection issue … goto “Troubleshoot Connection to Mac” in the next section
- Once you can see your IP, setup X11 forwarding with XQuartz
- Finally SSH in with the following command
ssh -X pi@192.168.3.2
- If prompted for a password enter “raspberry” (which is your default password and you should change it at some point)
- You can setup passwordless login using the tutorial here https://www.raspberrypi.org/documentation/remote-access/ssh/passwordless.md
- … finally this is what it looks like
- See Routing Table with the following command
Troubleshoot Connection to Mac
If you are unable to see an IP assigned to your Pi or unable to Ping it or SSH then there could be several reasons for this
- Check your ethernet cable – I was using a bad cable when connecting to the Mac and a a good one when connecting to the router (when testing standalone), this cost me a lot of time!
- Check your Mac Settings
- I did not change the System Preferences -> Network -> Ethernet
- Mac by default assigns 192.168.2.2 IP to your Pi, this may not get used if your Pi has “static” IP setup … validate by doing the followin
-
cat /etc/network/interfaces
- ensure you use “dhcp” instead of “static” as shown below
-
- Check your Pi
- while hardware issues are rare, you could have a problem there. Compare with another Pi
- is it powered on? are the ethernet lights on when you connect the cable?
Software Install
… after you are done setting up the SSH / headless pi access, you can finally start building a usable platform
see Part II of the journey to build services over the PI to send out and read in data!
1 Comment