I need to disconnect and reconnect the wifi of my RaspberryPi (Ubuntu) via SSH in order to test the error handling. I'm using:
sudo ifconfig wlan0 down && ifconfig wlan0 up
However, the connection does not appear to be reactivated, since I have to reboot it manually (unplug and plug back in) in order to be able to connect again via ssh. Otherwise, it just says
ssh pi@raspberrypi
ssh: connect to host raspberrypi port 22: Connection timed out
ifup
/ifdown
present? – Panki Dec 03 '19 at 09:59ifconfig
is a rather dated command, AFAIK it for example doesn't start a DHCP process. Runifup wlan0
instead ofifconfig wlan0 up
– Panki Dec 03 '19 at 10:21