Israel denied any knowledge of the case when Ashtari was detained.
In an Iranian state television broadcast aired on Saturday, Ashtari appeared to be confessing to espionage charges during his trial.
He said: “I made a mistake, I was afraid to go to the ministry of intelligence. This fear caused me to choose the wrong ways. I could not choose any correct way, all the roads that I chose were deads ends.
“Please pay attention to my confession and be aware. Don’t play with your lives. See what’s happened to me and learn a lesson. Do not repeat my mistakes.”
Ashtari was given “special equipment” to contact Mossad which he collected during visits to foreign companies at exhibitions abroad, the statement said.
Tensions have been mounting between the two states as Israel has accused Iran of seeking to build nuclear weapons.
Iran has said its nuclear aims are restricted to civilian energy production only.
Ashtari’s conviction for Israeli-linked espionage is believed to be the first in Iran for almost a decade.
Iran’s official news agency, IRNA, also reported on Saturday that four “terrorists” with “Zionist equipment” had been arrested in west Iran.
Tehran said the four were planning to carry out assasinations but did not reveal when they were detained.