This is bizarre…
I couldn’t figure out what was going on when I tried to SSH from my Pop!_OS desktop machine to my Ubuntu 23.04 Thinkpad…
“Connection Refused”
Usually when something like that happens, I assume one of :
- sshd is not running (or installed)
- some kinda firewall is blocking access
Tested on the machine itself “ssh 0” and I get straight in (“0” being shorthand for “localhost”).
I can ssh to it from BOTH MacBooks… no drama! WTF? Stopped firewall (systemctl stop firewalld) - still no SSH access from Linux desktop to Linux laptop!
So - I enable WiFi on the desktop machine, and I’m straight in… Weird!
I’m sure this wasn’t happening BEFORE I got a new router, and/or new PCIe wifi card for the Thinkpad… Hmmm…
This warrants further investigation - I don’t think it’s the new WiFi CHIP on the Thinkpad, it’s either something on my router that won’t allow all comms / bridged across WiFi and ethernet, or, some wonky Ubuntu thing…
Note: Synergy works perfectly (server is on ethernet, Thinkpad client is on WiFi). Also had a session (ssh from desktop to laptop) open, and it stayed alive when I disabled WiFi on the desktop, so I exited, and reconnected (i.e. ethernet only) and I got straight in… Bizarro!
Never seen this happen before… Perplexing…
Hmmm - just thought - it might be some arp cache type thing, i.e. changed MAC address (when I replaced the PCIe card on the Thinkpad)?
Weird alright! I can’t even ping my personal MacBook from my Linux desktop…
I’m going to reboot EVERYTHING and see if it’s dodgy arp tables or something!
All that effort for zero reward (rebooting stuff) - still happened - then “LIGHT BULB MOMENT” :
That Thinkpad had a dedicated lease on my old router, i.e. fixed IP address via DHCP - and I’d “conveniently” plonked an entry into /etc/hosts on my Linux box…
Which is closely related to the symptom “if something’s not working, check DNS first!” issue…