0

So I'm running an Ethernet cable from my Mac to my Pi, network sharing is enabled on my Mac. Here's what my setup looks like

enter image description here

So I head over to my Pi and try ping google.com, I get

ping: unknown host google.com

Here's what I get when I try to SSH into the server

$ ssh pi@192.168.2.2
ssh: connect to host 192.168.2.2 port 22: Connection refused

My ifconfig on the Pi enter image description here

Any ideas?

  • Please edit your question and include the output from ifconfig. – Steve Robillard Jul 14 '15 at 0:39
  • All set, sorry for the picture, copying it over would of been a long process @SteveRobillard – user302975 Jul 14 '15 at 0:52
  • try SSHing to 10.0.0.5. so in your case SSH pi@10.0.0.5 – Steve Robillard Jul 14 '15 at 1:05
  • 2
    The source of the problem seems to be that the Pi and Mac are not on the same network one is on 10.0.0.5 and the other is on 192.168.2.2. Second the Pi has an IP adress but does not appear to have any DNS servers or gateway - hence you get a failure when pinging Google. – Steve Robillard Jul 14 '15 at 1:08
  • 1
    Shouldn't RPi be in the same subnet as your computer ? Try assigning a static IP of the same subnet (192.168.2.xx) to your rpi by modifying /etc/network/interfaces as per this guide modmypi.com/blog/… and reboot. And try SSHing IP you assigned after reboot. Hope it helps. – dhruvvyas90 Jul 14 '15 at 5:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.