2

I'm as new as possible to Raspberry Pi, and I'd like to configure the following:

  • My Raspberry Pi connected directly to my Mac via an Ethernet cable, so that I can setup and run the RP entirely from my Mac via SSH.

  • My Mac and Raspberry Pi configured so that the RP connects to the Internet through a shared connection on my Mac.

Ideally I'd like to be able to accomplish this "headlessly" (if that's a word): starting out of the box with the Raspberry Pi, plugging it in to the Mac, and going from there.

Is there a way to accomplish this? This (for a variety of reasons) is the only way I can use the Raspberry Pi, so I'm hoping it can be done!


OS X 10.11.1; RP 2 B v1.1

orome
  • 219
  • 1
  • 4
  • 12
  • Your can connect directly if you have a static ip set on both devices. You can edit the cmdline.txt file in the home dir to have a certain self assigned ip if it doesn't detect a dhcp server.
    just put "ip=192.168.0.122" (or whatever ip you want it to have) at the end of the first line. Also need to set your mac to have a static ip on the same subnet. For a shared connection that takes a bit more work..
    – raspi-ninja Dec 03 '15 at 20:37

1 Answers1

2

See the answer at https://raspberrypi.stackexchange.com/a/38493/8697 NOTE this assumes you have installed a recent Raspbian (not NOOBS, which needs a monitor/keyboard to setup).

I think this would work without configuration, but if you can borrow a monitor and keyboard to initially setup it can be made to work.

No you cannot configure "so that the RP connects to the Internet through a shared connection on my Mac". You can use Ethernet to access the Mac, OR to give internet access, not both.

Milliways
  • 59,890
  • 31
  • 101
  • 209
  • "You can use Ethernet to access the Mac, OR to give internet access, not both." I assume you mean "access the Raspberry Pi", correct? – orome Dec 01 '15 at 23:13
  • If so that's too bad, if I understand, since it means that I effectviely can't access the Internet from the RP (since I need to be able to access the RP from the Mac to do that). – orome Dec 01 '15 at 23:14
  • Yes, "access the Raspberry Pi" (actually both directions). It may be possible by setting up a bridge on the Mac, but this is advanced configuration. If you want to explore this ask on a Mac/Unix support site. – Milliways Dec 01 '15 at 23:33
  • It looks like this won't work for me, but I have a question about another approach that might save things. – orome Dec 05 '15 at 16:06