How to preconfigure wifi on Mac OS X (Yosemite)?

Solution 1:

  • Go to the network preferences panel in System Preference
  • Select airport, then 'Advanced...'
  • Press the plus button

It will work even when the network isn't near.