Could not ssh into Pi 5

I had an issue where attempting to ssh login into the Pi 5 using <hostname>.local did not work. The ".local" domain means that the internal LAN IP address for the device does not need to be remembered because the system finds, advertises it on the internal network and all other hosts record it.

The displayed message:

  • ssh: Could not resolve hostname <hostname>.local. Name or service not known.

was a clue, albeit an obtuse one.

I checked the Pi logs with journalctl and reviewed dmesg and systemctl status but nothing obvious was evident. Nothing showed up. 

Internet search indicated that maybe the mDns config was not quite right., specifically the DNSMulticast option in resolved.conf. i.e the .local name could not be resolved, perhaps because it was not registered.

To fix this (one of the fixes according to my friends on the WWW is that the DNSMulticast option setting in the /etc/systemd/resolved.conf file is not set correctly.

Invoke your preferred editor:

  • sudo nano /etc/systemd/resolved.conf  

Replace 

  • #DNSMulticase=no

to

  • DNSMulticast=yes

Save the file with Ctrl-O, Return, and then exit with CTRL-X.

then

  • sudo reboot 

From another host use 

  • ssh <hotname>.local 

and you should be promoted to enter your password almost instantly.

Cheers

 


Popular posts from this blog

Fixing Zero 2W suspending itself restricting ssh login

Raspberry Pi 5 with NVME Base Duo and 256 SSD

Installing the NVME Base Duo