0

I was using a Raspberry Pi3 successfully connecting from Win10 PC with hostname (ssh pi@hostname). Ping hostname worked also.

I took the Pi3 chip and placed it into a Pi4. IP address changed from 192.168.1.180 to 192.168.1.181. I can still connect with ssh [email protected] but I can no longer connect with ssh pi@hostname. Nor can I ping hostname (i.e., ''Could not resolve hostname'').

status/attempts so far:

  • hostname command confirms it is known by ssh
  • Verizon My Network display shows the hostname
  • /etc/hostname and /etc/hosts both show hostname
  • i've rebooted the raspberry, the pc and the router many times
  • i've reinstalled os-lite a few times (deleting .ssh\know_hosts before each attempt)
  • i've tried using sudo raspi-config
  • i've tried changing the hostname to hostname2 and back
  • i noticed .ssh\known_hosts now only has one line with 192.168.1.181 ecdsa-sha2-nistp256... (with Pi3 it had two lines with hostname on the 2nd line), so i duplicated the 192.168.1.181 key with a 2nd hostname line ... no dice

Frustrating since it worked perfectly with Pi3.

4
  • 1
    If you want help you have to paste real data - not try to hide information (which is private anyway) and explain WHAT YOU DID.
    – Milliways
    Commented Feb 27, 2021 at 2:30
  • i've tried changing the hostname to hostname2 and back does hostname2 work if you DONT change it back? I'd also remove .ssh\known_hosts file on the client Commented Feb 27, 2021 at 2:33
  • jaromanda ... hostname2 didn't work and i have consistently removed known_hosts. milliways ... I'll post more details after trying andrew's approach below.
    – RKO
    Commented Feb 27, 2021 at 12:18
  • Andrew's arp -d * worked after I also performed sudo update. Thanks all for your help!
    – RKO
    Commented Feb 27, 2021 at 13:49

1 Answer 1

0

Clear the name cache in Windows.

Open an command line windows as an administrator and issue:

ipconfig /flushdns

If that does not work try:

nbtstat –R

Make sure that all entries for the machine name AND IP address (IPv4 and IPv6) are removed from the known_hosts file on the Windows PC.

You can also try arp -d * if the first two do not work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.