disabling the local ESXi shell will not terminate a session that is already logged in at the console. It will only prevent new logins.
With remote SSH sessions the behavior is the same: Existing ssh session will continue to run after you disable the SSH shell.
Did you close the existing session and re open it after you disabled the ESXi shell? Does it still work?
this is because the session which you used to disable the shell might not have been disconnected, make sure you come out of the DCUI and login back , you wont get the shell prompt
Thank you all for replying I had to type exit on the command line in shell. Then when it was disabled then it did not allowed to me logon again.