Monday, May 4, 2015

Guide: Mac Internet Sharing with your Pi

Ok, here goes my second guide...

I myself have one of my Pis connected to my Mac via Ethernet and Internet Sharing (which by the way is surprisingly fast) and can be used without a Internet connection, perfect for working on your Pi on a plane.

1. Open up System Preferences and make sure you're at this page:

2. Select Sharing on the third row and you should come up with a screen like mine, except yours probably doesn't have as many things checked. Select Internet Sharing.
3. Configure your connection from and your outgoing connection (which is going to be Ethernet). Then check it and press Start. (This is not going to be a security threat, since the would-be attacker would need physical access to the Ethernet to get your Internet, just so you know).

4. Now you can connect your Pi with any regular Ethernet cable. If you have a laptop, your going to need a Thunderbolt or USB connector to get Ethernet out. Your pi should already get an IP address through DHCP.

5. Now, open the Terminal and type in arp -a which will come back with a load of IP addresses. Find the ones that are different and only have a few entries. I came back with this:
The ones I'm interested in are the ones with 192.168.2.X. Yours might be different, but it should only have three addresses (in my case 192.168.2.1 which is my Mac, 192.168.2.2 which is my Pi, and 192.168.2.255 which is the mask). Your Pi won't be .255 or .1 so choose the one which makes the most sense. I choose 192.168.2.2. When in doubt, you can always try different ones.

6. Now type ssh pi@192.168.2.2 where 192.168.2.2 is your IP address that you just found. Now you have successfully connected to the Raspberry Pi console.

You can ask questions in the comments! Thanks for reading!




No comments:

Post a Comment