-1

I set up a pi zero for the first time, flashing Rasberry Pi OS Lite to an 8GB microsd with an ssh and wpa_supplicant.conf file to quickly connect the device to my wifi.

Worked fine for a few hours, was able to pop on the Pimoroni Pirate Audio DAC HAT and install Mopidy. Successfully accessed the server over my home wifi network.

However, today I can no longer ssh in without getting a time out. Message:

ssh: connect to host raspberrypi.local port 22: Connection timed out

I also get a timeout when trying to access the Mopidy server over my internet.

Pi shows up when ping-ed, HOWEVER, I noticed that the last digit of the IP address has changed. For example, it went from: 180.186.0.72 to 180.186.0.73.

I'm new to pi's and to messing with IP addresses, etc, so any tips on trouble shooting are appreciated.

HJT
  • 101
  • 1

2 Answers2

0

It sounds like the dhcp lease your pi had expired, and when it was renewed, instead of reissuing the same IP, your router issued a different address. This probably happened several times since you asked the question.

You will need to look at your router's client list and find out what the current ip is for the ip at the time you look.

If you don't want to look up the current ip of your pi every time, there are two ways around this:

  • give your pi a unique hostname, and use the (enabled by default) avahi dynamic name service to ssh to yourpi.local (where yourpi is the name you give it)
  • Examine your router's configuration and determine what it's dhcp address range is (for example, 192.168.1.100-200) and adjust your pi's network configuration to give it a static address in the same subnet but outside the dynamic range (for example, 192.168.1.50). (You should ping this first just to make sure something else isn't using it.)
user10489
  • 1,001
  • 1
  • 6
  • 11
-1

On your DHCP you need to set Raspberry Pi's IP to static (refer to routers DHCP settings)
Try:

ssh pi@180.186.0.73

...assuming you current IP on the device 180.186.0.73 (and realizing it is a fake IP according to questioner. See comments)

In the /etc/ssh/sshd_config make sure line "Port 22" not commented out like "#Port 22".

Qareke
  • 153
  • 6