I've got my Pi connected to my router using a regular Ethernet cable and I can SSH into the Pi. That works pretty well, but I now want to connect my Pi to the Wi-Fi so I don't need an Ethernet cable anymore.
So following these instructions I created a file /etc/wpa_supplicant.conf
and pasted in the following:
network={
ssid="ssid_name"
psk="password"
}
I then did the following:
pi@raspberrypi:~$ sudo wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dwext
Successfully initialized wpa_supplicant
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
pi@raspberrypi:~$
pi@raspberrypi:~$ sudo dhclient wlan0
Restarting ntp (via systemctl): ntp.service.
pi@raspberrypi:~$
I don't really know what this output means so I just disconnected the cable to see what would happen. Unfortunately my SSH session got cut off, and in the UI of my router I don't see the Pi appearing as a Wi-Fi connected device.
So from here I'm kinda lost. Seeing that I don't even know if it is possible to connect to a router using both Wi-Fi and an Ethernet cable, I'm not sure if it is possible at all to connect it to the Wi-Fi from an SSH session.
If that is not possible, I guess the only option is to get a screen and a keyboard for my Pi, right?
All tips are welcome!
ssid="ssid_name"
in the quotation marks you should have put in your router's ssid. And where it sayspsk="password"
you should have put your router's password into the quotation marks. Then you can SSH in as normal using the IP address of your Pi.