https://bugzilla.mindrot.org/show_bug.cgi?id=3649

--- Comment #12 from wolfgang.liessm...@web.de ---
I had a look at the issue again and was able to track it down to the
OpenSSH client, not the sshd service at the server side.

When using the SSH client shipped with current macOS, it works, but the
SSH client shipped with Homebrew fails.
So the problem is caused by the client, not the server.

The server sshd log contains:
2024-09-06 22:14:37.[...]+[...] [...]    sshd: Read error from remote
host 192.168.1.[...] port [...]: Connection reset by peer

As a preliminary solution, I will stick with the SSH client shipped
with macOS.


Step to reproduce


Create Makefile:

#SSH := /usr/bin/ssh # Shipped with macOS
SSH := /opt/homebrew/bin/ssh # Shipped with Homebrew
SSH_MASTER_SOCKET := ~/.ssh/socket
SSH_ACCESS_SECONDS := 20

test_ssh:
$(SSH) -MNf -o ControlPersist=$(SSH_ACCESS_SECONDS) -S
$(SSH_MASTER_SOCKET) root@server
$(SSH) -S $(SSH_MASTER_SOCKET) root@server ls


Run:

# make test_ssh


Error output at client side:

Control socket connect(/Users/wolfgang/.ssh/socket): Connection refused


Server sshd log:

2024-09-06 22:14:37.[...]+[...] [...]    sshd: Read error from remote
host 192.168.1.[...] port [...]: Connection reset by peer

(Internet search on this error message didn't produce any helpful
results.)


To view the sshd log on the server (also a Mac), the following steps
were necessary:

1. Adding the following line to /etc/ssh/sshd_config:
LogLevel DEBUG3

2. Restarting the sshd service:
sudo launchctl stop system/com.openssh.sshd
sudo launchctl start system/com.openssh.sshd

3. Accessing the logs as described at:
https://stackoverflow.com/a/54148031


Enabling/disabling the firewalls produces no different result.


Versions (all software updated):

# /usr/bin/ssh -V
OpenSSH_9.7p1, LibreSSL 3.3.6
# /opt/homebrew/bin/ssh -V
OpenSSH_9.8p1, OpenSSL 3.3.1 4 Jun 2024

# sw_vers
ProductName:            macOS
ProductVersion:         14.6.1
BuildVersion:           23G93

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs

Reply via email to