missing raspberry hostname
Posted: 8. Jun 2019, 06:19
I don't know if this is a Salix glitch or a Pi one. I have a Raspberry Pi running headless attached to my router, with the following in /etc/hosts:
My router recognises 'raspberrypi' as a connected dhpc client, but I can no longer ssh into the pi using that name rather than the assigned IP address:
It was working fine a day or two ago. I have tried rebooting with no effect.
I'm not sure why the pi's /etc/hosts has that entry ending 1.1 rather than 0.1, as on Salix; but I think there was some reason for it, and in any case, it was working before, and the router still registers the name.
Code: Select all
pi@raspberrypi:~ $ cat /etc/hosts
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 raspberrypi
Code: Select all
mimosa[~]$ ssh pi@raspberrypi
ssh: Could not resolve hostname raspberrypi: Name or service not known
I'm not sure why the pi's /etc/hosts has that entry ending 1.1 rather than 0.1, as on Salix; but I think there was some reason for it, and in any case, it was working before, and the router still registers the name.