Thanks for all the input.
It was /etc/profile indeed, that did the service shuthdown , but only if uid = 0 So when I ssh'ed as a normal user , it did not give my the error messages.
The script was altered by a s/w package install, that I was not aware of.
Sorry, feel like such an idiot !!
Thanks Shahed.