The 28-year old "Philemon K.", from Wil in in eastern Switzerland, was on an army refresher course at the time of his misplaced pleasantry, Blick newspaper reported.
The chirpy soldier, who normally works as a car painter, said he had only wanted to be polite when he arrived for morning duty on September 12th at the St Maurice barracks in the French-speaking part of Switzerland, just south of Montreux.
“I was glad to be there and have always been a proud soldier,“ he said.
The incident occurred when the colonel arrived at the barracks in uniform but in a civilian vehicle. The soldier, who did not recognize his superior, asked to see his credentials as he greeted him with the decidedly unmilitary "bonjour".
The soldier said the blunder led to him being interrogated by the enraged colonel for 45 minutes. He was then ordered to spend four days in prison, to be served after his army course.
Philemon K. said he is disappointed as he never has had any problems in the army before.
“How am I supposed to explain this to my employer? What will he think of me when I tell him I have to go to jail?“ he asked.
The soldier said he even wrote the colonel a letter to say sorry, but his apology was not accepted.
Peter Malama, an FDP (Liberal) member of parliament and himself a colonel, told Blick he believed a reprimand would have sufficed as he decried the punishment as an excessive "display of power".
Philemon K. said he is hoping to be relieved of his punishment as he has to return to work and cannot afford to go to the military court to plead his case.
“I feel totally powerless and at their mercy,“ he said.