Saleh said Iran had the right to obtain nuclear technology for peaceful purposes.
He made his remarks during a meeting with Ayatollah Mohammad Taskhiri, special envoy to Iranian supreme leader, Ayatollah Ali Khamenei, in the Yemeni capital, Sanaa.
An official statement quoted Saleh as affirming to his Iranian guest that "we stand by Iran in good and bad times, because we have common concerns."
The Yemeni president said that if nuclear bans are to be applied, they should be done so on all countries without exception.
The statement, carried by the official Yemeni news agency, SABA, said the Iranian envoy handed Saleh a written letter from Ayatollah Khamenei on his country's position regarding its nuclear program.
Officials privately said the envoy's visit to Sanaa was a reflection of Iran's "appreciation for Yemen's supportive position" on its nuclear program and vote in the International Atomic Energy Agency against decisions that pave the way to referring the issue to the U.N. Security Council.
Yemeni-Iranian relations suffered a brief setback in June after Sanaa implied an Iranian intervention in supporting a Shiite insurgency in Yemen.
But ties warmed up again after the former head of Iran's nuclear program, Hassan Rohani, came to Yemen a month later to officially declare his country had no links with the Shiites in the Arab country.
Celebrity Couples of 2014 [PHOTOS]