SSH works but cannot PING and access VNC viewer for Raspberry Pi 3B

1.7k Views Asked by At

On my Mac terminal, I can get my Pi ip address using this command line:

arp -n raspberrypi.local

it return the IP address of the pi. and then I can absolutely SSH into the raspberry pi using these command lines:

ssh-keygen -R raspberrypi.local ssh [email protected]

However if I ping the pi, it return request timeout and I also cannot access the vnc viewer.

PING from Network Utility

Everything worked just fine when I first log in to this raspberry pi but then this happened.

1

There are 1 best solutions below

0
Inc0 On

A device not responding to ping doesn't mean it has a problem. "Ping" packets (https://it.wikipedia.org/wiki/Internet_Control_Message_Protocol) have to be allowed to reach a destination and the destinations has to be allowed to reply. Usually there's a firewall allowing/denying this kind of traffic.

Assuming the services you're speaking about, are correctly running on the machine (server) you want to connect to:

  • ssh runs on port 22: a firewall policy need top be in place to allow you (the client) to connect to the server on port 22
  • vnc runs on port 5900 (and above) according to the configuration: also in this situation, a firewall policy has to be in place to allow you (the client) to connect to the server