Trump receives a ceremonial saber at the Coast Guard Academy Commencement. ABC15 Arizona

Secretary of Homeland Security Gen. John Kelly poked fun at President Donald Trump's issues with the press at a Coast Guard Academy commencement on Wednesday.

Trump was presented with a ceremonial saber after giving a commencement speech. After posing for a photo with the saber fixed to a plaque, Trump took his seat next to Kelly who quipped "you can use that on the press."

"Yeah," Trump responded with laughter.

President Donald Trump has faced constant scrutiny from the press since his administration began. As of late, he has come under fire for his firing of FBI director James Comey, his alleged sharing of guarded intelligence about ISIS with the Russian foreign minister, and allegations that Trump obstructed justice by asking Comey not to look into his former National Security Adviser, Michael Flynn, who Trump has since fired for misrepresenting talks he had with Russian ambassador Sergei Kisylak.

During Trump's address to the Coast Guard's graduates, he seemed to veer from the script to address his adversarial relationship with the press, which he has described as the enemy of the people.

"Look at the way I've been treated lately," said Trump. "Especially by the media. No politician in history, and I say this with great surety, has been treated worse or more unfairly. You can't let them get you down. You can't let the critics and the naysayers get in the way of your dreams. I guess that's why, thank you, I guess that's why we won."