connecting to a hidden WAP router

John Hubbard ender8282 at yahoo.com
Wed Dec 10 23:12:45 UTC 2008


Nigel Ridley wrote:
> Which leads to the next question: If iwlist can see the router, is there a command line 
> option/app for connecting to an access point/router that iwlist 'sees' even if it isn't 
> broadcasting its ESSID?
>
>   
I don't remember where I found it but somewhere on ubuntu forum there is 
a post about command line approaches for connecting your network. Here 
is the script that I wrote to connect for me.
#!/bin/sh

down(){
sudo ifconfig eth1 down
sudo dhclient -r eth1
}

up(){
sudo ifconfig eth1 up
sudo dhclient eth1
}

case "$1" in
home)
down
sudo iwconfig eth1 essid 'HIPPOWIRELESS' key XXXXXXXX mode managed
up
;;
work)
down
sudo iwconfig eth1 essid 'NOAO-Tucson' key XXXXXXXX mode managed
up
;;
dock)
down
sudo dhclient eth0
;;

*)
down
sudo iwconfig eth1 essid ${1}
up
;;
esac

exit 0

In short 'connect home' takes down my wireless (eth1) in case it was up, 
configures the essid and key to use, then brings it back up, and 
requests a ip address (DHCP).
You can also look at the man pages for iwconfig, ifconfig and dhclient.


-- 
-john

To be or not to be, that is the question
                2b || !2b
(0b10)*(0b1100010) || !(0b10)*(0b1100010)
        0b11000100 || !0b11000100
        0b11000100 || 0b00111011
               0b11111111
        255, that is the answer.






More information about the kubuntu-users mailing list