You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Firewall Issues - ssh_dispatch_run_fatal errors during SSH

Just upgraded to Sequoia and noticed a lot of issues with the firewall while using ssh.


After ssh'ing into a local server on my network, after a few minutes I get this error:


Bad packet length 2489765067.

ssh_dispatch_run_fatal: Connection to 192.168.30.2 port 22: Connection corrupted


I can trigger it by ssh'ing into pretty much any server or computer on my network and then executing a command like:


ping google.com


within 10 - 30 seconds, the connection drops.


Happens with IPv4 and IPv6. Happens with Terminal and iTerm apps.


Disabling the firewall fixes the issue. In this case, my Mac is running statically in my local network and safely behind an upstream firewall. So, it's annoying to have to disable the firewall every time I have to ssh in anywhere, but not the end of the world. Obviously, that isn't a long term fix, however.


Anyone else seeing similar?

Mac Studio

Posted on Sep 17, 2024 6:35 PM

Reply
Question marked as Top-ranking reply

Posted on Sep 19, 2024 7:34 PM

For those of you bypassing by disabling the firewall -- that's not a practical solution for enterprise users who either should not or cannot disable firewall. macOS developers, I hope you're tuned in to these discussions -- it's a huge blocker for those of us who rely on Mac as a developer's tool.

58 replies

Oct 18, 2024 4:20 AM in response to mikeloiterman

Hi


Disabling the firewall can not be a solution.

Since macos 15.0.1 is using OpenSSH it could be a cipher problem.

Following parameter cipher add works now for an hour!



ssh -c aes256-gcm@openssh.com user@targethost


works also with



ssh -c chacha20-poly1305@openssh.com user@targethost


But it helps only for 1, 2 hours then the behaviour comes back.

Oct 20, 2024 8:54 AM in response to tbirdvet

tbirdvet wrote:

Did not last long with firewall off. For me the solution was to turn off WiFI and only use ethernet.

Please understand that this issue happens with everything, wireless or ethernet, as it doesn't depend on the network interface. I have a docking station with ethernet and I get it every now and then. You're just lucky you didn't get it in this short period of time. Give it long enough time and it will happen again.


The most painful part of this issue is that people keep tinkering with things, and then one thing fixes the issue temporarily, and everyone yells "eureka"... like I said before, the internet is literally flooded with "MacOS network timeout issues", and everyone thinks they got a fix, but eventually it comes back, and people don't have time to track this and most of the time they prefer to just restart MacOS. The core issue is still there though. I do really hope Apple will fix it (and part of me is happy that Sequoia made the issue quite pronounced, so that it gets fixed once and for all). I did report the issue through feedback assistant, and have proven that it's an issue in MacOS. Let's wait and see.

Oct 20, 2024 12:24 PM in response to SamWantsYouToChill

My issue may be somewhat different from this original issue posted here. I had a web page that would only open about 1/2 of the time (happened several times a day). After trying all settings I found another link from another user indicating it may be related to having both ethernet and WiFi on at the same time (service order has ethernet first). But after turning off WiFI no more web page loading issues for the last two days so I'm keeping my fingers crossed. Never had this issue prior to Sequoia 15.0.1

Oct 20, 2024 3:04 PM in response to mikeloiterman

Same problem here .... 2 weeks ago I upgraded from 14.7 to 15.01 ... ever since my ssh connections are *very* flaky; the breakdown anywhere between 15 minutes and 2 hours, with the same error message:


Bad packet length 1345936880.
ssh_dispatch_run_fatal: Connection to 210.7.46.210 port 22: Connection corrupted


Trying the *trick* others mentioned in places (adding a specific cipher) gave me this immediately:


ssh_dispatch_run_fatal: Connection to w.x.y.z port 22: message authentication code incorrect


I also experience issues w/ e.g. vSphere/vCenter ... virtual consoles disconnect spontaneously at random times (independent of the browser session from which the were spawned, the session remains active, just the console disconnects).



Firewall Issues - ssh_dispatch_run_fatal errors during SSH

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.