Raspberry Pi Zero W 2 – SSH Freezing Over Wifi

While trying to setup a shiny new Wyoming satellite on a Pi Zero W2 for my Home Assistant, I almost smashed it into pi zero dust.

If you’re running Debian 12 (Bookworm) on your Raspberry Pi Zero W2 and SSH seems to hang after you enter your password, you’re definitely not the only one. It turned out to be a relatively simple fix related to the Quality of Service (QoS) settings for SSH.

This may work for other Pi variants as well as OS’ but I haven’t tested them. If you’re SSH session is freezing, lagging, or just not working when you try to connect to your Raspberry Pi using a wifi connection, its worth a shot!

The Culprit: QoS Settings I suppose

It turns out that the problem was linked somehow to network traffic over WiFi and how SSH is handled, specifically due to the QoS settings in the SSH daemon configuration. Why? No idea! Why this fix works? Also no idea!

The Fix

The solution was straightforward. All I needed to do was tweak the SSH configuration to disable those problematic QoS values. Here’s how you do it:

1. Edit the SSH Configuration

Open the SSH configuration file with a text editor. For example, using nano:

sudo nano /etc/ssh/sshd_config

2. Add the QoS Setting

Scroll down to the end of the file and add this line. By setting it to “0x00”, you are effectively disabling any special QoS prioritization

IPQoS 0x00

3. Reload and Restart SSH

After you’ve saved your changes (in nano, that’s Ctrl + O to save and Ctrl + X to exit), reload and restart the SSH service with these commands:

sudo systemctl reload ssh
sudo systemctl restart ssh

4. Reconnect via SSH

Now, try connecting again. You should be able to log in and use your terminal without any freezing issues.

So, if your Raspberry Pi Zero W2 running Debian 12 is giving you SSH headaches, check out the QoS settings in your sshd_config file. Adding IPQoS 0x00 and then reloading and restarting SSH fixed things for me, and it might just do the trick for you too.

Leave a Comment