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 6, 2024 6:00 PM in response to sandinak

sandinak wrote:

This is one area where I think Microsoft had a better approach by having profiles based on network location that apply different levels of security profile; and other tools could benefit from the approach.
This is a user-to-user support forum for consumer users. Companies typically have all kinds of specialized configurations and software that we don't have and can't support.


MacOS has this profile-per-network location support for a long time. Unfortunately, Apple buried its configuration so deep that ordinary users will need a shovel to find it, I'm kidding, of course - but it is simply not as obvious as before, this is what I meant. :)


Use network locations on Mac - Apple Support


Sep 30, 2024 4:10 AM in response to pmne04

I came on to post a different question, but thought this post was potentially relevant.


I factory reset to Sonoma and upgraded to Sequoia yesterday. Before I started adding anything, I was updating the settings, layouts, folders etc to make sure things are how I like it to be.


For some reason a few folders and items have been added to my shared folder - which I've never seen before. I don't think I've had anything in my shared folder before. (it might've always been there and that I wasn't observant/forgot)


So the new folder/items that have been put there are:


'/Users/Shared/Relocated Items/Configuration/private/etc/ssh.system_default'


Inside the ssh.system_default folder there is:


  • crypto.conf symlink
  • crypto/
    • apple.conf
    • fips.conf
  • ssh_config.d/
    • 100-macos.conf
  • sshd_config.d
    • 100-macos.conf
  • moduli
  • ssh_config
  • sshd_config


Again, this could be absolutely fine/normal, but I was coming on here to ask if it was and saw this thread about ssh issues, so decided to message here first to see if maybe this is what's causing an issue for you? Maybe when you upgraded to Sequoia it moved some of your SSH config files to shared because it was conflicting for some reason?




Sep 18, 2024 10:06 AM in response to mikeloiterman

Hi Mike,


After a dreadful morning with all sorts of weird connection problems, found your post here, and thanks to it I found out the culprit (at least for me).


If you happen to be using a content filter or proxy, disable it (at least temporarily). I was using Microsoft Defender and as soon as I turned it filter off in Network > Filters all issues gone. No need to turn off Firewall.


HTH.



Sep 19, 2024 1:53 PM in response to sandinak

So with respect, security is a layered architecture. The default MacOS firewall, while less than optimal for many reasons and uses; still DOES block by default most inbound connections at a minimum. I too personally use Little Snitch as I want way more security than the default provides; however having this as a base doesn't hurt.


That being said, there's another issue here. Many companies REQUIRE the Firewall to be enabled as part of security profile; or other things are disallowed. So in those cases you're ****** if you do and ****** if you don't ;) I am probably gonna have to revert to a previous backup tonight to get back to functionality.

Sep 20, 2024 5:14 AM in response to lolaunderthegate

lolaunderthegate wrote:

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.

Just for clarification. I understand if you have some corporate policy that requires the firewall. You probably also have some corporate policy to install antivirus and key loggers. Corporate IT is hilariously incompetent.


But we don't work for your company. We can't fix those policies. All we can fix are your Mac problems.

Oct 5, 2024 4:26 PM in response to mikeloiterman

UPDATE: My SSH connection seems stable with Firewall ON, Limit IP Address Tracking ON, Private WiFi OFF (need it for MAC address pairing for DHCP at home), but Little Snitch OFF (Network-Filters - all disabled). I also contacted Little Snitch creator and was told that the issue **might** be solved by 15.1 (not 15.0.1, unfortunately).

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.