OpenWRT SSID Creation

HI Everyone!

Do anyone know how to create and drop SSID's in OpenWRT using a script or ssh like PuTTY?


The files you need to write to are /etc/config/wireless, /etc/config/network, and /etc/config/firewall. Use the GUI to set up an example so you can see the exact syntax to follow.

Be careful about accidentally overwriting the existing files rather than modfying/appending to them.

Thank you, I did that but I want to know if I can do it using some scripts or commands? So that I don't need to write huge list of information like we do using SSH.

Yes, it can be done. If you can SSH to the box, you can pipe a script to the box. If you're using ssh on a Linux box you can pipe a command/script directly. If you're using PuTTY on a Windows box, you can use plink to achieve the same result.

Do you mean I need to replace PuTTY with plink. If you don't can you explain me with a little more description of how I can do that?

You can even prep the config files in their entirety offline, and use SCP/SFTP to copy them to the target."how+to+use+plink"

PuTTY is for interactive sessions only. Plink can also be used for interactive sessions, as well as for piping scripts/automated commands to the target.

Windows 10 has built-in SSH nowadays.

I learned a cool trick for configuring from a script...

The uci show wireless command shows the UCI parameters for the /etc/config/wireless file. The output starts like this...

root@LEDE-ArcherC7:~# uci show wireless

To script a change, simply create a uci set ... command in front of the printed value e.g.

uci set wireless.default_radio0.ssid='OpenWrt5'

to change the SSID of the radio to the indicated string.

PS I use this trick in a script to repeatably configure my newly-flashed router to my desired settings. See for an example.


Finally! (See [ How to Enable and Use Windows 10’s New Built-in SSH Commands]( for example...)

I have updated the SSH Access for Newcomers page. But I still prefer Cmder as an attractive alternative, since it comes with a mini-bash shell for Win10.


Very good point. I'm so accustomed to just editing the /etc/config files directly that I forget about the very useful uci tool.

Very good example. Thank you for sharing :). I hope it would work for me.

Do anyone know how can we dynamically create and drop ssid? By dynamically I means moving ssid's from one access point to another with a script without writing a huge amount of code.

Let me know if you have any idea about that