VMware Cloud Community
vipal
Contributor
Contributor

Enable ESXi shell remotely

Team,

I know by default ESXi shell / SSH disabled, but is there any way to enable it remotely? I would like to automate few things (Setting VLAN and IP on hosts without login to IDRAC Console)

Note - ESXi are factory installed without IP

1. Access Dell IDRAC via putty

2. run "racadm gethostnetworkinterfaces" to get Dell USBNIC IP

3. SSH to host using this IP

4. run few ESXi commands

0 Kudos
4 Replies
Alex_Romeo
Leadership
Leadership

Hi,

these are the ways. Clearly for safety reasons there are none others.

Enable ESXi Shell and SSH Access with the Direct Console User Interface

Enable SSH on VMware ESXi 6.x - VirtuBytes

ARomeo

Blog: https://www.aleadmin.it/
0 Kudos
LucD
Leadership
Leadership

You can start the SSH service on an ESXi node  with

Get-VMHost |

Foreach {

    Start-VMHostService -HostService ($_ | Get-VMHostService | Where { $_.Key -eq “TSM-SSH”} )

}

Note that you don't need to use PuTTY anymore, there is now the Posh-SSH module.

See my Use Posh-SSH instead of PuTTY dive.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
vipal
Contributor
Contributor

Thanks LucD.

But the ESXi hosts doesnt have IP address. So i cannot connect with PowerCLI.

Let me explain once again

1. I have  afew Dell PowerEdge servers with ESXi installed ( without IP)

My plan is

1. Connect to IDRAC of that hosts via putty

2. run command "racadm gethostnetworkinterfaces" to get USBNIC IP

This NIC will be used to communicate with host OS (Solved: Server 2012 R2 iDRAC Virtual NIC USB Device - Dell Community )

3. SSH to host OS (it will have some random DHCP address)

4. Run required ESXi level command to set IP and VLAN

0 Kudos
LucD
Leadership
Leadership

Ok, then I think you will have to have a look at Ravi's DellPWESMANTools module.https://github.com/dell/DellPEWSMANTools


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference