Open vSphere Client and login with the root username and password. Once it opens..
Click the configuration tab.
Click Security Profile -> Properties
You should see Remote Tech Support (SSH)
Select Start automatically
Click Start if the status is Stopped
Click Ok -> Ok.
SSH is now enabled on ESXi.
Source: Link Link