Daniel Ellsberg, a co-defendant in the Pentagon Papers case, talks to media outside the Federal Building in Los Angeles on April 28, 1973. (Wally Fong/Associated Press)

Sanford J. Ungar is director of the Free Speech Project at Georgetown University and a Lumina Foundation Fellow.

Leaks and leakers. Just the words seem to have a negative aura about them, with unappealing connotations of plumbing problems and weak bladders. Surely, they are a scourge that disgraces journalism and weakens government.

When President Trump wants to discredit the FBI director he fired, James B. Comey, who acknowledged in Senate testimony that he had shared with a friend private memoranda he wrote about his strange meetings with the president, it’s easy: “He’s a leaker,” said Trump, his voice dripping with contempt.

When Jeff Sessions, who, perhaps foolishly, gave up his safe Senate seat from Alabama to become Trump’s attorney general, finds himself facing a barrage of unfair criticism from his patron and is desperately seeking a way back into his good graces, there is a simple path: promise to be relentless about tracking down and punishing the evil leakers. “This culture of leaking must stop,” said Sessions indignantly.

What right-thinking American could not be repelled by these appalling people and practices?

But wait a minute. What if leaks — more attractively labeled “inside information” or “revelations” — and leakers — more euphemistically called “sources” or “whistleblowers” — are part of the lifeblood of American democracy, one of the few reliable ways we find out what is actually going on?

Anyone practicing real journalism in this country (and quite a few other places, too) learns right away that he or she cannot necessarily count on government always to offer the full, or truthful, story about what it is doing. The same holds for business, the nonprofit sector, even the art world and sometimes journalistic institutions themselves. The job is not to be a simple transcriber, and leaks are one vehicle for getting things right.

I remember vividly the advice a wise and experienced FBI agent gave me when I was writing a book about the bureau: “Be careful not to get a bad case of the ‘for-reals,’ ” he said. In other words, do not assume that everything happens according to the rulebook or the way officials say it does.

Indeed, during that project and many others, I benefited professionally from leaks, admittedly some more reliable than others. I sometimes made use of those that checked out, fully realizing that I might be denounced by the same people who had given me the information. That’s what they had to do to protect themselves from discovery.

Not all leaks are equal, of course. Many leakers have patriotic motivations, but one must always weigh the intentions of the leaker and deploy a healthy dose of common sense to avoid the risk of being burned or used by a source.

When it comes to national security information, which is what Sessions seems to be particularly worked up about, the record is far different from what he would have us believe. Many well-respected editors and reporters in the mainstream media, including The Post, have consulted with officials before publishing sensitive stories, and they have sometimes held them back from publication, rather than risk damage to national security.

And there are few, if any, examples where it can be shown that leaks did any genuine harm, beyond embarrassment and awkwardness for politicians or policy makers. Not the stories of the United States cracking the Japanese military’s codes early in World War II. Or reports of training Cuban exiles for the Bay of Pigs invasion. Or the publication of the Pentagon Papers. Or more recent revelations of electronic espionage by the U.S. government.

In fact, despite the tougher stance on the issue begun under the Obama administration, to this day the federal government has never tried to prosecute a reporter for revealing classified information.

Is it useful, on balance, for us to learn from secret transcripts that Trump bullied the leaders of Mexico and Australia in phone conversations with them shortly after taking office? Different people may draw the line in different places, but I would say that’s an easy “yes” and wish for more such transcripts to be leaked — if only to give us an alternative to the president’s self-promoting tweets as a source of information about current U.S. policy.

As for Sessions’s boasts that it will be easy to identify the leakers, skepticism is in order. “Leak investigations” are often long, frustrating dead-ends. That is why J. Edgar Hoover, who usually wasn’t shy about abusing his power during his 48 years running the FBI, was famously reluctant to take on leakers. Hoover didn’t like to fail, and he knew that quite often the source of a national security leak could be the president himself.

The Trump administration is not the first to make the empty threat of leak investigations. When things got bad 45 years ago, President Richard Nixon and his Justice Department tried that, too, but it didn’t work. It intimidated some and struck fear in the hearts of others, but so far as we know, it did not prevent a single leak. Most citizens, including those who serve in Congress, realize the importance of preserving a free press and their own ability to speak (and yes, sometimes leak) freely, even at the risk of displeasing a president and his beleaguered attorney general.