Today I installed Ubuntu server, and connected to my wireless by following this steps:
$ ifconfig wlan0 up
$ sudo /etc/init.d/networking stop
$ wpa_passphrase "ssid" "password" > wpaconfig
$ sudo wpa_supplicant -iwlan0 -cwpaconfig
Press ctrl+z
$ bg
$ sudo dhclient wlan0
Credits for this instructions goes to this site.
I am able to connect, but on reboot I have to repeat all the steps, even though it is simple and straightforward, I would prefer if I could connect automatically.
How can I achieve this?