
added this line to /etc/rc.local on the Pi, before exit 0:.Made sure I could SSH from the Pi to my Mac, without a password prompt, as root: (If it was already on, then cycle it so it uses the new port.)Ĭreate a public/private keypair for SSH, with no passphrase: ssh-keygen -N ""Ĭopied the public key (id_rsa.pub) into ~/.ssh/authorized_keys on my MacĬopied the private key into /home/pi/.ssh/id_rsa on my Pi

Turn on Remote Login on my Mac in Apple Menu->System Preferences->Sharing. (To set this up, the Pi serial console, but a screen+keyboard would have worked just as well I probably could have also used SSH to get into the Pi if Internet Sharing was turned off.)Ĭhange the default SSH port on the Mac, by editing /etc/services and changing the SSH line to TCP port 43188 (note: this means you have to use -p22 when connecting to normal SSH servers) it is created when the Pi starts up and is attached to Mac ethernet with Internet Sharing turned on.

So what I did is create a remote forwarding SSH tunnel, since the Pi can see the Mac. (The Pi can access the Mac at 192.168.2.1, however.)Įither of these could be solvable if the Mac provided interface bridging (which it does in 10.9+, but it doesn't really work with WiFi, which I need), or port forwarding for its NAT using Terminal (which I've had no success with, and apparently completely changed from natd to pf in Mountain Lion).

Basically, the problem is that when you directly attach, the Pi has no internet if Internet Sharing is turned off, but the Mac can't access the Pi if Internet Sharing is turned on.
