This week I've been preparing for an Optimise and Troubleshooting Fast Track course and in this course we use the the command line a lot.
There's a number of different ways to enable SSH and the ESXi Shell.
One way is via the vSphere client
Launch the client
Hosts and Clusters View, select host, select configure tab and then Services and start the ESXi Shell and SSH
Another method is from the ESI hosts Direct Console User Interface DCUI
Login to the DCUI via the F2 key, go to Troubleshooting options and enable the services.