President Obama was in Fort Meade, Maryland, Friday to mark the 14th anniversary of the Sept. 11, 2001, terror attacks with a "troop talk."
The president thanked military members and their families for their service and sacrifice before taking questions both from service members present at the event, and online via Facebook, Twitter and Skype and satellite, according to Pentagon Spokesman Peter Cook.
Obama reassured the troops that the U.S. must work to make sure that the men and women in uniform have the strategy and resources they need to succeed, noting that the U.S. is still an indispensable force for good around the world.
The president says the country still faces significant threats, including from the Islamic State group forces in the Middle East.
Fort George G. Meade, a sprawling military installation between Washington and Baltimore, is home to the National Security Agency. About 11,000 military personnel and 29,000 civilian employees work on the property.
The Associate Press contributed to this report.