My Dev Env – remote access to a Raspberry Pi

You have three UI options for logging into your Raspberry Pi:
1. The “standard” way: connect a USB keyboard and HDMI monitor directly to the Pi.
2. connect a PC or Mac to the Pi by plugging a USB-to-serial console cable like the Adafruit 954 into the Pi’s GPIO header, and use the Terminal app on your laptop to connect and login to the Pi as described here.
3. connect your Pi to your local network and then use the SSH app on your Mac to open a remote session on the Pi as described here.
I  use all three methods, and each has its benefits in different situations.
Once I’ve initially setup my Pi for networking using option 1 or 2, I find the third option – connecting via LAN – most flexible, since it doesn’t require the Pi to be tethered to my Mac or any other equipment. I can power up the Pi on my workbench, and as soon as it’s connected itself to the WiFi, I can SSH into it from anywhere in the house. Or even over the Internet if I open a port in my router for the purpose.

Its important if you’re going to SSH into your Pi to set a fixed IP address for the Pi, so you can always find it.
By default, most networks use DHCP to dynamically allocate IP addresses as devices connect to the network, meaning your Pi can be assigned a different IP address every time.
You can assign a fixed IP address to your Pi through configuration settings on the Pi itself, or by configuring your home network router.
To configure your router, first look up the unique hardware ID of your Pi known as the MAC address, as described HERE
Open your router configuration tool, and open the list of connected devices (refer to the user manual of your router) and look for this MAC address. You should be able to give this device a name (e.g. “RPi”) and a fixed IP address.
Every time you boot your Pi, it will be given this IP address when it connects to the network.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s