The attacker blew himself up as the troops were waiting to collect their salaries, the government sources added.
Islamic State militants have repeatedly claimed responsibility for deadly attacks on troops in the southern port city, which is under the control of the internationally recognized government in exile in Saudi Arabia.
The Kingdom intervened in Yemen's civil war in March 2015 to fight the government's foes in the Iran-allied Houthi movement but have failed to dislodge the group from the capital Sanaa despite thousands of air strikes.
At least 10,000 people have been killed in the conflict which has unleashed a humanitarian crisis on the impoverished country.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ