Enabling SSH Login on VMware ESXi
The VMware ESXi version 4.1 has started to support SSH login, and you can enable SSH server on the hypervisor. Versions lower than 4.1 do not support SSH login but you can enable it with unsupported command; please search the keywords "VMware ESXi unsupported" by yourself for greater detail.
To launch the SSH server from vSphere Client, please enter to "Configuration" and then edit the "Security Profile" as shown in Fig. 1.
Thus, you can run the SSH server via "Services Properties" as shown in Fig. 2.
After launching the SSH server, you can login to the VMware ESX/ESXi hypervisor. Here we provide useful command examples that can be executed from a command line shell (ash).
Getting Virtual Machine Status
- Getting all virtual machines:
# vim-cmd vmsvc/getallvms Vmid Name File Guest OS Version Annotation 32 vm1 [datastore1] vm1/vm1.vmx freebsd64Guest vmx-07Here, we note that the obtained "Vmid" is used for handling the virtual machines with other commands.
Handling Virtual Machine Power Status
- Getting the current power state:
# vim-cmd vmsvc/power.getstate 32 Retrieved runtime info Powered onPlease replace "32" with your intended vmid.
- Reset power of a virtual machine:
# vim-cmd vmsvc/power.reset 32Please replace "32" with your intended vmid.