SSH Problem. Wifi connected

ssh: connect to host 192.168.0.16 port 22: Operation timed out
syedzayyanmasud@Syeds-MacBook-Air ~ % ssh patch@192.168.0.16

I get the following error.

Funny thing the Pi is connected to the internet during the first seconds of bootup. I can see it in the attaced devices list. Where is it going wrong?

This might indicate that the IP address is not correct, are you sure it’s right and that both devices are connected to the same local network?

I can check on my router’s admin. When I connect the Pi, it comes on the list of attached devices. (So yes definitely they are on the same network.) For a while. And then it disappears. The whole while I can’t connect via SSH.

I tried connecting to the Pi’s network as well. With VNC I could see that the Pi is in fact connected to my home network.

But for some reason I can’t SSH into it with my home network. I can connect to Pi’s own network which is quite a hassle. I should have mentioned I use the Raspberry Pi Zero W.

Can you ping the IP? (use ping 192.168.0.16 if it’s the right number)

Does SSH work if connecting via the hotspot hosted by the Pi?

This is what happens when I ping right after I connect the Pi to power:

syedzayyanmasud@Syeds-MacBook-Air ~ % ping 192.168.0.16
PING 192.168.0.16 (192.168.0.16): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
Request timeout for icmp_seq 7
Request timeout for icmp_seq 8
Request timeout for icmp_seq 9
Request timeout for icmp_seq 10
Request timeout for icmp_seq 11
Request timeout for icmp_seq 12
Request timeout for icmp_seq 13
Request timeout for icmp_seq 14
Request timeout for icmp_seq 15
Request timeout for icmp_seq 16
Request timeout for icmp_seq 17
Request timeout for icmp_seq 18
Request timeout for icmp_seq 19
Request timeout for icmp_seq 20
Request timeout for icmp_seq 21
Request timeout for icmp_seq 22
Request timeout for icmp_seq 23
Request timeout for icmp_seq 24
Request timeout for icmp_seq 25
Request timeout for icmp_seq 26
Request timeout for icmp_seq 27
Request timeout for icmp_seq 28
Request timeout for icmp_seq 29
Request timeout for icmp_seq 30
Request timeout for icmp_seq 31
Request timeout for icmp_seq 32
Request timeout for icmp_seq 33
Request timeout for icmp_seq 34
Request timeout for icmp_seq 35
Request timeout for icmp_seq 36
Request timeout for icmp_seq 37
Request timeout for icmp_seq 38
Request timeout for icmp_seq 39
Request timeout for icmp_seq 40
Request timeout for icmp_seq 41
Request timeout for icmp_seq 42
Request timeout for icmp_seq 43
Request timeout for icmp_seq 44
64 bytes from 192.168.0.16: icmp_seq=45 ttl=64 time=276.001 ms
64 bytes from 192.168.0.16: icmp_seq=46 ttl=64 time=33.710 ms
Request timeout for icmp_seq 47
Request timeout for icmp_seq 48
Request timeout for icmp_seq 49
Request timeout for icmp_seq 50
Request timeout for icmp_seq 51
Request timeout for icmp_seq 52
Request timeout for icmp_seq 53
Request timeout for icmp_seq 54
Request timeout for icmp_seq 55
Request timeout for icmp_seq 56
Request timeout for icmp_seq 57
Request timeout for icmp_seq 58
Request timeout for icmp_seq 59
Request timeout for icmp_seq 60
Request timeout for icmp_seq 61
Request timeout for icmp_seq 62
Request timeout for icmp_seq 63
Request timeout for icmp_seq 64
Request timeout for icmp_seq 65
Request timeout for icmp_seq 66
Request timeout for icmp_seq 67
Request timeout for icmp_seq 68
Request timeout for icmp_seq 69
Request timeout for icmp_seq 70
Request timeout for icmp_seq 71
Request timeout for icmp_seq 72
Request timeout for icmp_seq 73
Request timeout for icmp_seq 74
Request timeout for icmp_seq 75
Request timeout for icmp_seq 76
Request timeout for icmp_seq 77
Request timeout for icmp_seq 78
Request timeout for icmp_seq 79
Request timeout for icmp_seq 80
Request timeout for icmp_seq 81
Request timeout for icmp_seq 82
Request timeout for icmp_seq 83
Request timeout for icmp_seq 84
Request timeout for icmp_seq 85
ping: sendto: No route to host
Request timeout for icmp_seq 86
ping: sendto: Host is down
Request timeout for icmp_seq 87
ping: sendto: Host is down
Request timeout for icmp_seq 88
ping: sendto: Host is down
Request timeout for icmp_seq 89
ping: sendto: Host is down
Request timeout for icmp_seq 90
ping: sendto: Host is down
Request timeout for icmp_seq 91
ping: sendto: Host is down
Request timeout for icmp_seq 92
ping: sendto: Host is down
Request timeout for icmp_seq 93
ping: sendto: Host is down
Request timeout for icmp_seq 94
ping: sendto: Host is down
Request timeout for icmp_seq 95
ping: sendto: Host is down
Request timeout for icmp_seq 96
^C
--- 192.168.0.16 ping statistics ---
98 packets transmitted, 2 packets received, 98.0% packet loss
round-trip min/avg/max/stddev = 33.710/154.855/276.001/121.146 ms

And this is my attached devices list:

Screenshot 2021-07-05 at 08.58.39

I have another Pi running PiHole, but its on an on-device basis with nothing to do the router.

The WiFi connection seems to be very bad - only 2 ping messages got a reply out of 100, so that’s why SSH won’t work. Make sure the connection is strong enough between the devices. Things like metallic enclosures can impact the WiFi signal, or router and device placement in your home. :slight_smile:

The Pi Zero is bare. There is no enclosure and the wifi works fine with Raspbian though. I placed the Pi with router as well. No luck. :frowning:. And like I said the Pi dissappears after a while from the admin list on my router.

I can SSH into the Pi with its own network though.

Try updating the kernel: sudo apt update && sudo apt install raspberrypi-kernel.

Thanks for the answer. It did not directly solve my problem. But…I found out the pi did not have the internet connected putting in the command but weirdly enough in the GUI it has a tick mark. Anyways.Since the hotspot auto starts on the first boot itself I think Patchbox OS cannot connect to the wifi even though I was using wpa_supplicant.conf script. :rofl:. I think the startup wizard should include the checking for updates bit after the wifi connection thing. I think the startup wizard should include the checking for updates bit after the wifi connection thing, for people running on SSH. Because of the update window I thought maybe the Pi’s already connected. :man_facepalming:

1 Like