US intelligence chiefs have refused to say whether Donald Trump asked them to curb an FBI-led investigation into contacts between his campaign and Moscow.

The director of national intelligence, Dan Coats, and the head of the National Security Agency, Michael Rogers, faced tough questioning from the Senate intelligence committee on Wednesday about their communications with the president, after a spate of reports that he had asked them to use their influence to stop or restrict the investigation.

Coats said he had never felt “pressured” to shape intelligence “in a political way”, but when pressed on his communications with Trump and the question of whether the president had asked him to step in to influence the investigation, he said he would not respond in a public hearing, saying it was not “an appropriate venue”.

The Washington Post reported on Tuesday night that Trump had asked Coats to press James Comey, the then FBI director, to back off from focusing on his former national security adviser Michael Flynn.

Rogers, when asked about his contacts with Trump, said: “I am not going to discuss the specifics of any interactions or conversations that I may or may not have had with the president of the United States.” But he added: “In the three-plus years that I have been director of the NSA, to the best of my recollection I have never been directed to do anything I believe to be illegal, immoral or unethical.”

When asked later whether the president had asked him to downplay the Russia investigation, the NSA director did not respond directly, simply repeating his previous statement to the effect that had not been directed to do anything wrong.

Both Coats and Rogers said they had contacted the White House to ask whether it intended to invoke executive privilege regarding the president’s conversations with them, which could prevent the intelligence chiefs from testifying about them. Rogers said he had yet to receive a definitive answer.

At the same hearing, the acting director of the FBI, Andrew McCabe, was asked whether he had talked to Comey, his predecessor, about claims that Trump put pressure on Comey to close down Russia-related inquiries.

McCabe refused to answer, saying he did not want to “step into the lane” of the special counsel, Robert Mueller, who was appointed on 17 May to investigate Russian efforts to skew the 2016 presidential election in Trump’s favour. McCabe pointed out that the committee would hear from Comey directly on Thursday.

Rod Rosenstein, the deputy attorney general who appointed Mueller, declined to comment on the circumstances of Comey’s dismissal. The day before the sacking he had drawn up a memorandum that was critical of the FBI director’s performance. Trump has sometimes pointed to that memo to justify sacking Comey, and on other occasions has said he would have fired him anyway, referring to the Russian investigation as a factor.

The refusal to answer questions on conversations with the president irritated both Democrats and Republicans. The veteran Republican John McCain said it was “Orwellian” that it was possible to read in the Washington Post about extraordinary pressure on intelligence chiefs from the president, which McCain said was “more than disturbing if true”, but not to get clear answers in a formal Senate hearing.

Senator Angus King, an independent, demanded to know the legal basis for the intelligence directors’ refusal to answer questions on seemingly non-classified matters.

Coats and Rogers said they would be prepared to answer more questions in a closed session on Wednesday afternoon, and the committee chairman, Richard Burr, told them to go back to the administration to make sure they could answer questions in closed session or in an even more secret setting with congressional leaders.

“At no time should you be in a position where you come to Congress without an answer,” Burr warned them.

In one testy exchange subsequently shared on social media, California senator Kamala Harris, a Democrat, pressed Rosenstein on whether he would sign a letter that said the Department of Justice would provide Mueller, the special counsel, with full independence.

Harris and Rosenstein went back and forth on the question. She interjected to ask Rosenstein for a simple yes or no response. At this point, Burr, the committee chairman, intervened to suspend Harris’s line of questioning.

“Will the senator suspend?” Burr said. “The chair is going to exercise its right to allow the witnesses to answer the question, and the committee is on notice to provide the witnesses the courtesy, which has not been extended all the way across, extend the courtesy for questions to get answered.”

On Twitter, several people observed that male senators on the panel had also interrupted the witnesses, but noted that Burr singled out Harris, one of just three women on the committee.

After the exchange, Senator Elizabeth Warren, who was prevented from making remarks on the Senate floor earlier this year, tweeted her support for Harris.