Shimano internal-gear hubs with more than three speeds connect the shift cable to the hub by the use of a "cassette joint", which is a pulley mechanism that fits around the axle, just outboard of the sprocket (but inboard of the bicycle's frame. For details on this, see my Nexus Technical Page.