Can't ping a linux server with MacOSX. Software related

I recently solved a very similar problem by removing my ARP cache.

I have a MacBook Pro 2014 and Ubuntu 18.04 desktop which runs the SSH daemon, and every client works fine except my MacBook.

I ran Wireshark and observed that pinging my desktop is only resulting in ARP requests to be broadcasted — I couldn't see response packets. At first I thought it's a problem with my router interface, but since other computers worked fine that made little sense.

At last I decided I found out that I can remove my laptop's ARP cache by running this:

sudo arp -d <desktop's_ip>

and it solved my problem! This solved my problem!