This question already has an answer here:
I have run into a situation where I'd like to get my wireless working without the benefit of a monitor, by sshing in. I have KDE on the system, have enabled autologin for one of the users and would now like to set up the wireless to automatically connect without kwallet prompting me for a password. (That way I can ditch my ethernet cable and move my computer out of the way).
I assume that this requires me to store the password in an unencrypted file; that's just fine with me. I've run across some ways to do that via the gui (such as this solution) but, for my circumstances, I need to be able to pull this off via ssh.
Would anyone know how to accomplish this? It would be much appreciated.