How to SSH into your Raspberry Pi with a Mac and Ethernet Cable

First things first, get a ethernet cable.

Hook the cable up to your Raspberry Pi and Mac.

Power up the Raspberry Pi.

Next, we need to enable Internet Sharing.

Go to System Preferences -> Sharing.

Select Thunderbolt Ethernet (or whatever option that is being used as the ethernet connection).

Enable the Internet Sharing option if it isn’t already selected.

After that, open up System Preferences -> Network.

You should be able to see the Thunderbolt Ethernet option if you hooked it up correctly

You should be able to see that Using DHCP is selected by default. Use the dropdown menu to select this option if it’s not already selected.

Next, you should be able to see the Connected status on that same page, and an IP address should have been assigned to you.

My IP address in this case is 169.254.165.53

Go ahead and pull out your favorite terminal. I am a fan of iTerm, but the default Mac Terminal works just fine. You can find this by going to Applications -> Utilities -> Terminal.

Type in ifconfig, and you should see a bridge100 option.

bridge100 listed here after typing in ifconfig in the terminal

Look for the inet field. In this case, mine is 192.168.2.1. Yours might be different.

Next, type in

nmap -n -sP <Your IP Address>/24 

into the terminal. For my case, I would do

nmap -n -sP 192.168.2.1/24
nmap

After you run this, there will be multiple scan reports that show up here.

Notice that the first one for me is 192.168.2.1, which is similar to what I have when I typed ifconfig. This is basically my local machine itself.

You want to select the other option, which is your Raspberry Pi. In my case, that’ll be 192.168.2.2

Go ahead and ssh into the Pi

Finally, go ahead and ssh into the Pi by typing

ssh <username>@<Your Pi IP address>

In my case, it’ll be

ssh pi@192.168.2.2

Type in your password, and if you did that correctly, yay, you’re in!

Congrats! You’re now connected to your Pi with just an ethernet cable :)