1

this is the tutorial I've been following

I can not SSH into my Pi unless the wifi on my laptop (MBP) is on and internet sharing is enabled.

I have my laptop set to a manual LAN address of 192.168.2.2 and my Pi connected via LAN.

If I have both wifi and internet sharing enabled I can connect using either ssh pi@sephpi.local or ssh pi@192.168.2.3

If I try to ssh 192.168.2.2 I get a connection refused.

When I use nmap with wifi disabled, this is what I get:

$ nmap -sn 192.168.2.0/24

Starting Nmap 6.49BETA4 ( https://nmap.org ) at 2015-08-11 19:44 CDT
Nmap scan report for 192.168.2.2
Host is up (0.00063s latency).
Nmap done: 256 IP addresses (1 host up) scanned in 3.05 seconds

When I use nmap with wifi and internet sharing enabled, this is what I get:

$ nmap -sn 192.168.2.0/24

Starting Nmap 6.49BETA4 ( https://nmap.org ) at 2015-08-11 19:16 CDT
Nmap scan report for 192.168.2.1
Host is up (0.00073s latency).
Nmap scan report for 192.168.2.2
Host is up (0.00056s latency).
Nmap scan report for 192.168.2.3
Host is up (0.0012s latency).
Nmap done: 256 IP addresses (3 hosts up) scanned in 3.10 seconds

My LAN connection has a good status:

Status: Connected

Ethernet is currently active and has the IP address 192.168.2.2.

If I connect while wifi and internet sharing are on and disable either of them, my SSH session freezes and when I turn them back on I get the error pi@sephpi ~ $ Write failed: Broken pipe


EDIT:: Everything broke somehow. I've only been turning wifi on and off.

EDIT 2:: It went back to the original problem above. The following is for the sake of those who may wander here later.

This is now what happens with wifi on:

$ nmap -sn 192.168.2.0/24

Starting Nmap 6.49BETA4 ( https://nmap.org ) at 2015-08-11 20:04 CDT
Nmap done: 256 IP addresses (0 hosts up) scanned in 103.22 seconds

And with wifi off:

$ nmap -sn 192.168.2.0/24

Starting Nmap 6.49BETA4 ( https://nmap.org ) at 2015-08-11 20:07 CDT
mass_dns: warning: Unable to open /etc/resolv.conf. Try using --system-dns or specify valid servers with --dns-servers
mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is disabled. Try using --system-dns or specify valid servers with --dns-servers
Nmap done: 256 IP addresses (0 hosts up) scanned in 0.02 seconds
  • There is still a considerable amount of information lacking here. For instance: are you running behind a gateway or firewall? Does the gateway/firewall provide DHCP service? It may be that when you turn internet sharing on, your laptop starts providing DHCP to the Pi, which then gets an IP address and is reachable. If internet sharing gets turned off and the ethernet link to the Pi goes down, it will be back to being unreachable. – WineSoaked Aug 12 '15 at 5:50
  • You might try using an APIPA address (169.254.0.0/16) on the laptop with internet sharing turned off, and see if nmap reaches the Pi that way. I'm guessing it just might. – WineSoaked Aug 12 '15 at 5:51
  • I do not have a gateway or firewall running. I've tried $nmap -sn 169.254.0.0/16 with internet sharing off and both wifi on and off and the result is nothing... I think. I gave them both a solid 7 minutes or so and there was no result, so I'm pretty sure it's just hanging. – Seph Reed Aug 12 '15 at 20:14
  • I crave some kind of drawing or other diagram of your network. I still get the feeling there's not enough detail to be able to say anything for certain. – WineSoaked Aug 12 '15 at 23:11

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.