The Malaysia Airlines flight 128 was bound for Kuala Lumpur on May 31, when this incident occurred.
However, in a plea deal, prosecutors struck out a more serious charge of attempting to hijack an aircraft, which attracts a maximum of life imprisonment.
A charge of reckless conduct endangering aircraft safety, by attempting to enter the cockpit and threatening to detonate an explosive, was also withdrawn. A third charge of threatening to destroy, damage or endanger the aircraft's safety, or to kill or injure anyone on board, was also dropped.
The charge carries a maximum 20-year jail sentence, according to media.
He had lived in the Melbourne suburb of Dandenong on a student visa
On May 31 when he tried to take control over flight MH 128, he was grabbed by passengers who tied him up and later handed him over to police. The flight was forced to turn back to Melbourn due to this incident.
He had attempted to take control of the aircraft on the same day that he was released from psychiatric care, police said.