I recently got a new iMac running OSX 10.15.4 and got “Connection refused” errors on both Apple’s sshd and on Homebrew’s. I use ssh to connect to my machine remotely. Before I got my new machine I was using 10.15.2 with no problems.
The following is a sample of trying to connect to my local machine from Terminal:
harry@gull ~ % ssh -vvv 192.168.0.9
OpenSSH_8.2p1, OpenSSL 1.1.1g 21 Apr 2020
debug1: Reading configuration data /Users/harry/.ssh/config
debug1: Reading configuration data /usr/local/etc/ssh/ssh_config
debug2: resolve_canonicalize: hostname 192.168.0.9 is address
debug1: Connecting to 192.168.0.9 [192.168.0.9] port 22.
debug1: connect to address 192.168.0.9 port 22: Connection refused
ssh: connect to host 192.168.0.9 port 22: Connection refused
Interestingly, attempting to connect to 127.0.0.1 succeeds.
Does anyone have any ideas?