President Obama told The Tonight Show’s Jay Leno that he was frustrated by Russia’s decision to grant Edward Snowden asylum but said the two countries must work together.

"I was disappointed," he said of Russia's decision. "Even though we don't have an extradition treaty with them, traditionally we have tried to respect if there's a law breaker or alleged law breaker in their country, we evaluate it, and we try to work with them."

Despite this, Obama confirmed he would attend the G-20 summit in St. Petersburg in September.

"There are times when they slip back into Cold War thinking and Cold War mentality,” Obama said on air Tuesday evening. “What I continually say to them and to President Putin, that’s the past."

Obama last saw Putin at the G-8 summit earlier this summer in northern Ireland. The two leaders held a joint press conference, an experience that resulted in Putin "not looking too excited." said Obama.

Obama was interviewed by Leno during a stop in Los Angeles after the president attended a housing event in Phoenix Tuesday. He is set to travel to Camp Pendleton for a speech to troops Wednesday before returning to Washington.

He supported the NSA’s surveillance efforts, calling them a “critical component to counterterrorism" even while he acknowledged they have "raised a lot of questions for people."

"We don’t have a domestic spying program,” Obama said. “What we do have is some mechanisms that can track a phone number or an e-mail address that is connected to a terrorist attack. That information is useful."

Obama wouldn’t say what he would call Snowden – who has been labeled a hero and a traitor by different parties. The U.S. government has accused of him being a criminal.

"We don’t know exactly what he did, except what he said on the Internet and it's important for me not to judge,” Obama told Leno.

Obama said he asked his staff to look at ways to reduce the number of contractors in national security; Snowden worked for contractor Booz Allen Hamilton.

Obama defended recent decisions to shutter U.S. embassies in the Middle East and North Africa and to issue a global travel alert. Americans, he said, should still take vacation in a “prudent way” by reviewing State Department guidance on the Web.

"The odds of dying in a terrorist attack are a lot lower than they are of dying in a car accident, unfortunately,” Obama said.  "The general rule is just show some common sense and some caution."

Earlier Tuesday aboard Air Force One, White House press secretary Jay Carney said that the president's appearance on the Tonight Show was meant to "communicate with Americans where they are." In contrast to the usual back-and-forth between the administration and more traditional press, Carney acknowledged that "viewers of late-night shows are not necessarily the readers of newspapers or wire services, or necessarily viewers of cable or broadcast news shows."