

Ssh -o UserKnownHostsFile=/dev/null -o StrictHostKe圜hecking=no -p43188 -N -R2222:localhost:22 -i /home/pi/.ssh/id_rsa &

added this line to /etc/rc.local on the Pi, before exit 0:.
#Connect mac ethernet password#
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.
#Connect mac ethernet serial#
(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. Mac 911 cannot reply to email with troubleshooting advice nor can we publish answers to every question.Here's a solution I came up with. We’re always looking for problems to solve! Email yours including screen captures as appropriate. From the list on the left, click on Internet Sharing, and you will see Internet Sharing options. For that, restart the Mac and go into recovery mode. Setting this order means no mucking about when your network conditions change. Go into the mac’s System Preferences, under Internet & Wireless look for Sharing menu. If you cannot connect to the Internet: You will need to launch the Mac in recovery mode. Likewise, if you’ve unplugged from ethernet, you’d prefer Wi-Fi, but if that’s not available either, you want to use your iPhone’s hotspot. Initialize the Ethernet client library // with the IP address and port of the server // that you want to connect to (port 80 is default for HTTP): EthernetClient client void setup. Newer Ethernet shields have a MAC address printed on a.
When you’re plugged into ethernet, you don’t want to have to turn Wi-Fi, so you set ethernet as the first item in the Service Order. includeThe most likely scenario for this is cascading an ethernet, Wi-Fi, and iPhone USB connection with a laptop.

Click the gear icon and then select Set Service Order, and you can drag interfaces around in the priority you want OS X to use them when they’re available and connected. You can pick the order that OS X consults network interfaces.īut you can choose the order in which OS X access your local network and the Internet.
