The US has warned of a threat from Iran in recent weeks and Mr Shanahan briefed lawmakers at a closed-doors meeting.
Tension has risen sharply, with the US deploying military assets to the Gulf to tackle the unspecified threats.
On Sunday, President Donald Trump tweeted: “If Iran wants to fight, that will be the official end of Iran.”
He has maintained a strong anti-Iran policy since taking office and last year unilaterally withdrew the US from a nuclear deal with Iran and five world powers.
President Trump’s National Security Adviser, John Bolton, is a long-standing advocate for regime change in Iran and has previously called for the US to bomb the nation.
What did Mr Shanahan say?
Speaking to reporters, he said the US “posture is for deterrence” rather than war.
Mr Shanahan, who addressed lawmakers alongside Secretary of State Mike Pompeo and Joint Chiefs of Staff Chairman Gen Joseph Dunford, said: “I think our steps were very prudent and we’ve put on hold the potential for attacks on Americans and that’s what’s extremely important.
“I’d say we’re in a period where the threat remains high and our job is to make sure that there is no miscalculation by the Iranians.”
He did not publicly share details of the “credible information” related to the issue, but added: “I just hope Iran is listening. We’re in the region to address many things, but it’s not to go to war with Iran.”
Reports suggested the briefing was heated at times and, after the meeting, some Democrats accused government officials of twisting intelligence information.
“In my opinion, there wasn’t any information there that pointed to any reason why we should be engaging in talk of war with Iran,” said Representative Ruben Gallego.
Iran agreed the Joint Comprehensive Plan of Action (JCPOA) in 2015 to limit the scope of its nuclear programme in return for sanctions relief, and has called on other parties to uphold the deal despite the US withdrawal.
But the JCPOA looks to be increasingly under threat. Iranian officials said on Monday that they had increased by fourfold the production of low-enriched uranium – although the increase remains for the moment within the restrictions of the deal.
What is behind the escalation?
Tensions began rising this month when the US ended exemptions from sanctions for countries still buying from Iran. The decision was intended to bring Iran’s oil exports to zero, denying the government its main source of revenue.
Mr Trump reinstated the sanctions last year after abandoning the nuclear deal.
Days after the US withdrawal, Iranian President Hassan Rouhani said his country would suspend several commitments under the deal.
The White House then announced the US was sending an aircraft carrier, B-52 bombers and a Patriot missile defence battery to the region because of “troubling and escalatory indications” related to Iran.
Last week, four oil tankers in the Gulf of Oman were damaged in what the United Arab Emirates said were sabotage attacks while drone attacks on two oil pumping stations in Saudi Arabia by Yemen’s Houthi rebels – who are supported by Iran – forced the temporary closure of a pipeline.
Iran has denied that it was behind the incidents.
But Republican Senator Lindsey Graham said lawmakers at the briefing were told that both cases had been “co-ordinated and directed by the Iranian government, the ayatollah”.
There were also unconfirmed reports, citing US and regional security officials, that Iran had loaded missiles on to boats in Iranian ports and that Iran-backed Iraqi paramilitary fighters had positioned rockets near facilities in Iraq used by US troops.
What are other countries saying?
“I would say to the Iranians: do not underestimate the resolve on the US side,” UK Foreign Secretary Jeremy Hunt told reporters in Geneva on Monday. “They don’t want a war with Iran. But if American interests are attacked, they will retaliate.”
“We want the situation to de-escalate, because this is a part of the world where things can get triggered accidentally,” he added.
Saudi Minister of State for Foreign Affairs, Adel al-Jubeir, said the kingdom “does not want a war, is not looking for it and will do everything to prevent it”.
“But at the same time, if the other side chooses war, the kingdom will respond with strength and determination to defend itself and its interests.”
The foreign minister of Oman, which has brokered secret talks between the US and Iran in the past, visited Tehran to discuss regional issues with Mr Zarif on Monday.