6.0
Table Of Contents
- Getting Started with vSphere Command-Line Interfaces
- Contents
- About This Book
- Managing vSphere with Command-Line Interfaces
- Installing vCLI
- Running Host Management Commands in the ESXi Shell
- Running vCLI Host Management Commands
- Overview of Running vCLI Host Management Commands
- Protecting Passwords
- Authenticating Through vCenter Server and vCenter Single Sign-On
- Authenticating Directly to the Host
- Trust Relationship Requirement for ESXCLI Commands
- Common Options for vCLI Host Management Command Execution
- Using vCLI Commands in Scripts
- Running Host Management Commands from a Windows System
- Running Host Management Commands from a Linux System
- Running DCLI Commands
- Index
VMware, Inc. 25
Chapter 3 Running Host Management Commands in the ESXi Shell
Enabling SSH for the ESXi Shell
Bydefault,remotecommandexecutionisdisabledonanESXihost, andyoucannotlogintothehostusinga
remoteshell.YoucanenableremotecommandexecutionfromthedirectconsoleorfromthevSphereWeb
Client.
To enable SSH access in the direct console
1AtthedirectconsoleoftheESXihost,pressF2and
providecredentialswhenprompted.
2ScrolltoTroubleshootingOptionsandpressEnter.
3 ChooseEnableSSHandpressEnteronce.
Ontheleft,EnableSSHchangestoDisableSSH.Ontheright,SSHisDisabledchangestoSSHis
Enabled.
4PressEscuntilyoureturntothemaindirectconsolescreen.
To enable SSH from the vSphere Client
1 Select
thehostandclicktheConfigurationtab.
2ClickSecurityProfileintheSoftwarepanel.
3IntheServicessection,clickProperties.
4 SelectSSHandclickOptions.
5 ChangetheSSHoptions.
TochangetheStartuppolicyacrossreboots,clickStartandstopwithhostandrebootthehost.
Totemporarilystartorstoptheservice,clicktheStartorStopbutton.
6ClickOK.
To enable SSH from the vSphere Web Client
1 Selectthehost,clickManage,andkeepSettingsselected.
2ClickSecurityProfile.
3IntheServicessection,clickEdit.
4 SelectSSH.
Totemporarilystartorstoptheservice,clicktheStartorStopbutton.
TochangetheStartuppolicyacrossreboots,selectStartandstopwithhostandrebootthehost.
5ClickOK.
AfteryouhaveenabledSSH,youlogintotheESXiShellremotelyandrunESXiShellcommands.
Using the ESXi Shell with SSH
IfSSHisenabledonyourESXihost,youcanruncommandsonthatshellusinganSSHclient.
To access the remote ESXi Shell
1OpenanSSHclient.
2SpecifytheIPaddressordomainnameoftheESXihost.
PrecisedirectionsvarydependingontheSSHclientthatyouareusing.Seevendordocumentationand
support.
3Providecredentialswhenprompted.