RSS Amplifier

BurgeonLab: Full-text · Apr 12, 2026

How to SSH into Raspberry Pi over Ethernet on a Mac

0
Sign in to vote or save

Naty S · BurgeonLab

How I fixed high latency and laggy SSH after getting a new router. Steps on how to SSH into Raspberry Pi over Ethernet with direct connection on Mac devices.

Problem: High Latency and Lag on SSH

My little Raspberry Pi 4B homelab server has always been headless and accessed via SSH on my Mac. After upgrading the home router to the GL.iNet Flint2 last month, the SSH connection has been super flaky with severe lag.

Wi-Fi packet loss was high with 21.6%, with high jitter (up to 130ms) as seen in a ping test:

137 packets transmitted, 29 packets received, 21.6% packet loss
2round-trip min/avg/max/stddev = 4.565/24.382/130.340/31.171 ms

As a network noob, I guess the cause is because of the WPA2/WPA3 mixed mode? The previous router only had WPA2 and SSH was snappy with zero issues.

I tried turning off WiFi power-saving mode off on the Pi, toggling “Boot Wait for Network”, reinstalling network drivers firmware-brcm80211; but nothing helped.

Direct Ethernet Connection Between Mac and Pi

I was staring at the included Ethernet cable that came with the Flint2 and suddenly had this brilliant idea (I don’t know why I didn’t think of this earlier) of connecting the Pi directly to my Mac Mini and using the Internet connection from the Mac directly. Wasn’t sure if it could be done this way, but it seems to work great after some research and testing!

Note that my Mac Mini is running Sequoia v15.7.5 and the Raspberry Pi 4B runs DietPi OS. And I assume you already have SSH set up between your devices.

DISCLAIMER: I am a home networking newbie. This may not be the correct way to do things. It is mainly a log of my experience, please do your own research!

Ethernet Connection Setup

  1. On the Mac, System Settings > General > Accessories & Internet > Internet Sharing, click on the “i”, set your Internet source “Share your connection from” (mine is Wi-Fi) > under “To devices using” I selected “Ethernet” only for it to work (if the options are greyed out, turn the Internet Sharing toggle off first then click the “i” again)

  2. Connect the Pi to the Mac using an Ethernet cable

  3. Turn on the Pi and access the shell

  4. Run cat /sys/class/net/eth0/address and note down Pi’s MAC address (it’s the one that looks like 12:34:56:12:34:56)

  5. Mac Internet Sharing gives connected clients usually an IP address like 192.168.2.x

  6. Identify the IP address the Pi has been assigned by running arp -a on the Mac and search for the MAC address in step 5

  7. The IP address assigned is the one in the brackets:

    1? (192.168.2.2) at 12:34:56:12:34:56 on bridge100 ifscope [bridge]
  8. On the Pi > dietpi-config > “7. Network Options: Adapters” > ensure Ethernet adapter is turned on, I switched the mode to STATIC with “Copy current address to Static” > go back one page and “Run a connection test” > if it works, you could turn off Wi-Fi (if that is no longer required) > Apply changes and restart networking

  9. On the Mac, SSH into the Pi with the new IP address, ssh username@192.168.2.2

Latent-Free and Zero Lag SSH Achieved

It works so well now with super low latency and no more dropped packets! This SSH fix comes at a perfect time because I really need to restart my self-hosting game. Relying on third-party online services gives me no sense of security these days (e.g. DDoS or whatnot).

Resources

Read the original on burgeonlab.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.