Command line to disconnect or connect 802.1x authentication

Solution 1:

This button is tied to the eapolclient. When it's connected, you can disconnect it by killing the eapolclient process:

$ ps ax | grep eapol
83601   ??  Ss     0:00.05 /System/Library/SystemConfiguration/EAPOLController.bundle/Contents/Resources/eapolclient -i en0
$ sudo kill 83601

When I do this the GUI button switches to show it's disconnected. The bad news is, I don't know how you can start it again :(

Perhaps you can achieve the same by turning the interface off/on:

 sudo ifconfig <interface> down
 sudo ifconfig <interface> up