I have a raspberry pi 4 with latest version of raspian and i want 2 things:
1 - static IP for eth0 port, so that I can guarantee access via ssh without any monitor. 2 - configure a wifi network via SSH to my raspberry connect automatically.
for a static ip eth0 it's simple, first in /etc/network/interfaces.d folder, i created a file named eth0:
allow-hotplug eth0
iface eth0 inet static
address 192.168.0.10
network 192.168.0.0
netmask 255.255.255.0
gateway 192.168.0.1
and in /etc/dhcpcf/conf:
interface eth0
static ip_adresss=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
to connect my rpi in wifi, i try in /etc/wpa_supplicant/wpa_supplicant.conf
network={
ssid="HYBRAZIL-CGH-SIMONESIA-EST"
psk="HYbrazil2009"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
group=CCMP
auth_alg=OPEN
}
My router was WPA2-PSK key, and i reboot many times, but the rpi doesn't connect to wifi. What can i do?
Thanks a lot!