Running a Mac laptop with OSX Sonoma 14.6.1.
Trying to SSH from the Mac to a Raspberry Pi that I have set back up again. This Pi was in use some time ago and I was previously able to SSH into it.
Have updated the Raspberry Pi and verified that SSH is operational. I can SSH into the Pi from other instances on the same network. I simply cannot connect to it from the Mac laptop.
If I try to SSH from the laptop I get
ssh: connect to host xxx.xxx.1.xxx port 22: Connection refused
From the same Mac laptop I can SSH into other hardware or machine instances so there is no firewall blocking
- If I run with
-vvvfor debug I get:debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files debug1: /etc/ssh/ssh_config line 54: Applying options for * debug2: resolve_canonicalize: hostname xxx.xxx.1.xxx is address debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/Users/Chris/.ssh/known_hosts' debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/Users/Chris/.ssh/known_hosts2' debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling debug3: channel_clear_timeouts: clearing debug3: ssh_connect_direct: entering debug1: Connecting to xxx.xxx.1.xxx [192.168.1.248] port 22. debug3: set_sock_tos: set socket 3 IP_TOS 0x48 debug1: connect to address xxx.xxx.1.xxx port 22: Connection refused ssh: connect to host xxx.xxx.1.xxx port 22: Connection refused - I've tried to SSH with different apps - Terminal, Termius and Hyper but same underlying issue blocking this specific connection.
- I've tried changing the IP of the Raspberry Pi but it's made no difference.
- I've verified that I can SSH into other machines from the Mac laptop with zero issues.
- I've verified that SSH is working on the Pi and have connected from other machines.
- I've ran
tracerouteand it's a single route from my laptop to the Pi
Expecting to be able to SSH into the Pi as I have before and can with other devices
Update trying to look at logs:
Mar 11 15:44:01 raspberrypi polkitd(authority=local): Registered Authentication Agent for unix-process:4151:521958 (system bus name :1.63 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_AU)
Mar 11 15:44:10 raspberrypi polkitd(authority=local): Operator of unix-session:6 successfully authenticated as unix-user:USERNAME to gain TEMPORARY authorization for action org.freedesktop.systemd1.manage-units for system-bus-name::1.64 [systemctl restart ssh] (owned by unix-user:USERNAME)
Mar 11 15:44:10 raspberrypi sshd[652]: Received signal 15; terminating.
Mar 11 15:44:10 raspberrypi sshd[4162]: Server listening on 0.0.0.0 port 22.
Mar 11 15:44:10 raspberrypi sshd[4162]: Server listening on :: port 22.
Mar 11 15:44:10 raspberrypi polkitd(authority=local): Unregistered Authentication Agent for unix-process:4151:521958 (system bus name :1.63, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_AU) (disconnected from bus)
Mar 11 15:44:40 raspberrypi sudo: USERNAME : TTY=pts/0 ; PWD=/var/log ; `USER=root ; COMMAND=/usr/bin/cat /var/log/auth.log
Mar 11 15:44:40 raspberrypi sudo: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
Update 14 March
- Upgraded Mac OS to 15.3.2. Despite changes to SSH issue persists
- Tried laptop connection with ethernet to rule out this being a WIFI issue. Problem persists
- Created a new account on the Mac and tried from that. Issue persists
Convinced at this point problem resides on Mac Laptop as nothing indicates connection is reaching Pi to be declined.
~/.ssh/configfile)? What's that$SSH_SK_PROVIDERabout?sshdaemon logs on the server side of the connection at the time your Mac tries to connect? If you are using/etc/hosts.deny, is the Mac happening to be using a denied IP address and therefore not even able to get to the SSH dæmon?/etc/hosts.denyis not used and is empty. There is nothing in the logs on the server, like the connection is simply not reaching the server at all to be declined. The issue seems to be completely on the laptop