that is because you are trying to do a connection end to end between your pi and your computer but there is nothing on the pi to respond to the computer request
start by enabling ssh on the, on the /boot
partition add a file called ssh
connect the pi through ethernet to your router, it will get an IP, then
on your pc execute
sudo apt-get install -y nmap
hostname -I #this will return something like 192.168.x.x
now look for your pi with
sudo nmap -sn 192.168.x.0/24
you will get something like
Nmap scan report for 192.168.15.1
Host is up (0.018s latency).
MAC Address: 4A:02:71:67:4B:E6 (Unknown)
Nmap scan report for 192.168.1x.2
Host is up (0.070s latency).
MAC Address: 88:78:73:84:26:5A (raspberrypi)
Nmap scan report for 192.168.x.3
...
now simply ssh to your pi with
ssh pi@192.168.x.3 #pass raspberry
once inside, configure the wifi
sudo raspi-config
you can also use /etc/wpa_supplicant/wpa_supplicant.conf
to set the network
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="YOUR_SSID_HERE"
psk="YOUR_SECRET_PASSPHRASE_HERE"
id_str="SOME_DESCRIPTIVE_NAME"
}
sudo raspi-config
->interfacing options
->ssh
) – Benjamin Ashbaugh Apr 08 '18 at 19:49ssh
in the first partion of the SD card. Also, you can create a wpa supplicant file on the boot (first) partition of the SD card which will be used to configure wifi without even needing ssh - see https://raspberrypi.stackexchange.com/a/57023/33057 – Jaromanda X Apr 08 '18 at 23:26ethernet cable is not connecting to my PC
... this has nothing to do with a RPi, why are you asking about it here? – jsotola Apr 08 '18 at 23:40ssh
to theboot
partition on the sd card. – Benjamin Ashbaugh Apr 09 '18 at 00:02they have to both be connected to a router
- not necessarily – Jaromanda X Apr 09 '18 at 00:55