A version of this post originally appeared in the Cyber Saturday edition of Data Sheet, Fortune’s daily tech newsletter.
General Keith Alexander, the former NSA director, shared some smart thoughts this week about the line between espionage and cyber war. But it was the words of another famous military man, retired General Stanley McChrystal—who likewise spoke at Fortune’s Brainstorm Tech event—that left the biggest impression on me.
McChrystal, whose stellar career ended in scandal in 2010 over public criticism of his superiors, spoke candidly to Fortune‘s Adam Lashinsky about picking up the pieces to rebuild a life of pride and meaning. His redemption came about thanks to a one-day-at-a-time approach and the support of his wife, but that’s only part of it.
Another huge reason for McChrystal’s ability to move forward, I suspect, lies in his worldview rooted in public service and community. He acquired this perspective in the military but, as McChrystal noted, other institutions—such as the Peace Corps and Teach for America—can also imbue people with a similar sense of purpose.
This isn’t just personal feel-good stuff: It matters to the country as a whole because those who serve in the military or other institutions are far more likely to vote and participate in public activities the rest of their life. Alas, though, a huge number of Americans are AWOL from all of this.
McChrystal said two-thirds of young people are ineligible to serve in the military (due to drug tests and other restrictions), while Teach for America has become as hard to get into as Yale. In other words, there is a yawning gap between the number of people who would like to serve their country and the slots for them to do so. This outcome is a loss for everyone.
McChrystal said the way to address this is to create more opportunities to serve. And although he didn’t cite cyber security as a specific example, a term of government cyber-service could be an ideal way—given the crisis posed by insecure computer systems—for young people to both serve the country and gain work and life experience.
It’s not as far-fetched as it sounds. The military already provides such opportunities, of course, but there are also other organizations like Code for America, which let young people use their computer skills to help the country. There is also a strong tradition of unofficial cyber service—think of the white-hat hacker community—and a surge of interest in coding from young Americans of all backgrounds, including women and people of color.
There is an opportunity here for the United States to bolster security at a time of growing cyber danger, and to provide young Americans with a new opportunity for service and meaning. I’m pretty sure General McChrystal would approve.