David McNally also told a third-year Religious Education class at Kilwinning Academy, Ayrshire, in November last year that he would "rather have been a prison warden or a child abuser", the General Teaching Council (GTC) said.
The supply teacher was found to be unfit to teach at a GTC hearing today.
The comments were brought to light when pupils complained to their parents, who contacted the school.
Mr McNally did not attend the hearing but accepted he had made the remarks in his written submission to the hearing.
He said that he was having a "particularly bad day" and had made the comments in a "general sense". The GTC panel rejected his suggestion.
The Hitler comments were said to a Higher class in which he also asked pupils: "Did you have sex at the weekend?"
The GTC panel heard that he told a third-year class: "I love my mobile phone because I can sit and watch porn on it."
He was also reported to have said: "I have a part-time job at a children's home - they have taught me how to whip a child with a wet towel without leaving a mark."
The GTC panel ruled that Mr McNally be struck off the teaching register and cannot reapply to teach for two years.
In their decision, the panel said: "The panel had regard to the detailed submissions made by the respondent.
"They noted that he had suggested that after a long career, this had been a particularly bad day resulting in these comments.
"The panel rejected the suggestion that the comments had been made in a general sense.
"It noted that the pupils had reacted to the comments by reporting the matter to their parents.
"It noted that comments had been made to two separate classes. Accordingly, the panel did not accept that this had been one isolated incident.
"The panel was of the view that the explanations by the respondent did not reduce their gravity and considered that under any circumstances they were entirely inappropriate."
Mr McNally has the opportunity to appeal once he receives written notice of the GTC decision.