Connection problem to Rasperrypi with ETHERNET ET WIFI

At first, I used a laptop to connect rasperrypi with a Ethernet cable. I used IPscanner to search the IP address of raspberrypi as and successfully connected to Raspberrypi using MOBAXTERM SSH.

Then I configured wifi Raspberry, successfully found rasperrypi ip, and can take away the network cable, connect to raspberrypi in wifi via MOBAXTERM, and run the MATRIX CREATOR program.

However, after one night, when I want to connect again with MOBAXTERM, it show “error, time out” , and neither the Ethernet cable nor the WIFI IP can be connected.

I then scan with IPSCANNER, there are two raspberrypi IP address,, but they can not connect with MOBAXTERM, display “error, time out” error.

Then I deleted these two IPs directly at IPSCANNER software, re-recorded the SD card, and then loaded it into raspberrypi. Then I connected raspberrypi with the ETHERNET cable, but I could not scan the IP address of raspberrypi at to

Only an Ip show, but it can’t connect to raspberrypi with MOBAXTERM.Always showed “error,time out”.

Why this problem? How to solve it?

Did you try

sudo raspi-config

at the prompt to configure your Wi-Fi.

I’ve done sudo raspi-config to configure WIFI with name and password. At the begin it can be connect . But after that I couldn’t connect raspberry with Mobaxterm neither ETHERNET NOR WIFI.

A nice trick I use is to change the hostname on the Pi and just ssh using the hostname instead of the actuall IP. Not sure if that would help. Here is how :

  1. Connect the SD Card to you computer and mount the partitions (preferably from a linux pc)
  2. Modify the hostname by changing this files in the SD Card
$ cat /etc/hosts       localhost
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters       raspberrypi # change the hostname here ex: test-pi


$ cat /etc/hostname
raspberrypi # change the hostname here too. ex : test-pi
  1. After that, insert the SD Card into the Raspberry Pi and wait for it to boot and connect to the Wifi/Ethernet
  2. Try to ssh into it by using ssh pi@<your-hostname>.local . Ex :

$ ssh pi@test-pi.local


When I type root@DESKTOP-8HATSCT:~# cat /etc/hosts in ubuntu under windows 10. It show me bellow:

**# This file is automatically generated by WSL based on the Windows hosts file:**
**# %WINDIR%\System32\drivers\etc\hosts. Modifications to this file will be overwritten.**       localhost       DESKTOP-8HATSCT.localdomain     DESKTOP-8HATSCT

**# The following lines are desirable for IPv6 capable hosts**
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

But there is no raspberrypi showed.
That’s mean the respberry doesn’t connect with computer? But I’ve formated SD cart and wrote Raspbian to SD card. And the light of interface connection is green and yellow.
Why this problem?

In addition to the actual discussion:
as far as i know you can also change the hostname with raspi-config

1 Like

You can try to connect a HDMI display and keyboard to the Raspberry Pi to check if its actually connecting, and from there you can use raspi-config to change wifi settings.

Sorry, I was not clear before. I meant to change the hostname in the file located inside the SDcard, not your PC hostname. In my case would be something like this (after connecting sdcard to my ubuntu pc):

sudo nano /media/yoelrc88/rootfs/etc/hosts
sudo nano /media/yoelrc88/rootfs/etc/hostname

Easier than this is just using a display and a keyboard connected to the Pi and configure Wifi from there.