WASHINGTON — Like every Democratic president since John F. Kennedy, President Obama is battling the perception that he’s a wimp on national security.

It’s not just coming from Republicans (for example, Dick Cheney’s accusation that Mr. Obama is trying to pretend that the country isn’t at war). Now barbs are coming from the center too. This week’s Foreign Policy magazine has a provocative cover: Mr. Obama next to Jimmy Carter with — gasp — an “equals” sign in the middle. New York Times/CBS polling shows that public approval of Mr. Obama’s foreign policy dropped 9 points to 50 percent between last April and November. Leslie H. Gelb, president emeritus of the Council on Foreign Relations, wrote on the Daily Beast blog two weeks ago that Mr. Obama needs to toughen up with his adversaries. “He puts far too much store on being the smartest guy in the room,” Mr. Gelb wrote. “He’d do well to remember that Jimmy Carter also rang all the I.Q. bells.”

So soon? Here is a president who just ramped up the war in Afghanistan, sending an additional 30,000 American troops. He has stepped up drone strikes by unmanned Predators in Pakistan and provided intelligence and firepower for two airstrikes against Al Qaeda in Yemen that killed more than 60 militants. He has resisted the temptation to sign a new nuclear arms agreement with Russia that might not provide American inspectors with the level of verification detail that they want. He is moving toward the wide use of full body scans in American airports. On Thursday, in an oblique nod to the Cheney criticism, he even used the phrase “we are at war,” in describing the fight against Al Qaeda.

Of course, accusations that Democrats are genetically softer on threats to the Republic are nothing new. After World War II, Republicans mostly stopped attacking the Democrats as the party that had gotten America into two world wars, and began calling it soft on Communism. Roosevelt’s agreement to the postwar division of Europe at Yalta, followed by China’s fall in 1949 while Truman was president, spurred that on. John Kennedy managed to emerge from an early fiasco at the Bay of Pigs and achieve the counter-image of a cold war liberal, thanks to the Berlin and Cuban-missile crises; then Lyndon Johnson’s fear of being labeled “soft on Communism” helped him override his doubts about getting deeper into Vietnam. But after that, the ill-fated antiwar candidacy of George McGovern, followed by Jimmy Carter’s inability to rescue American hostages in Iran, sealed a stereotype of Democrats as, well, wimps.