You might experience this issue after upgrading to ESX 4.1.
But, fortunately there is plenty of information on the web, where you can find the answers how to easily re-enable SSH. One of those places are VMware KB. The KB explaining what to do when you're in situation like this.
After the upgrade, only the root can login on the console (but can't SSH). If you have another user account created on the ESX host Add this user to the administrator group. In fact you must add this user to the root group (administrator's group – if using windows authentication) to be able to SSH to your ESX 4.1, because the SSH for the root user is disabled.
You can easily enable SSH for root user as I blogged about this already in the past, but that's not the good practice. You should add this “secondary” user to root group, then use this account to log in switch to root by using this command: su –
Now if you don't have access to the console of your server (or it's too far from your chair…) and so you can't create your second ESX user via the CLI (because you can't log in), just fire on the VMware vSphere client and log in directly to your ESX 4.1 (not to vCenter).
Add second user to the ESX 4.1 via Gui:
01. Connect to the ESX 4.1 server via VMware vSphere client and go to the local users and groups tab
02. Add a user select Grant shell access to this user and click OK.
In fact, in the vSphere Upgrade guide you can see a note on page 69 where it's mentioned….
You can get the PDF from the link below:
https://www.vmware.com/pdf/vsphere4/r41/vsp_41_upgrade_guide.pdf
Hopefully it helps.
Source: Vmware KB8375637
You can also have a look at: Tech Support Mode for Emergency Support and this video: Using Tech Support Mode in ESXi 4.1
craig says
I will not recommend to allow root to access via SSH, as this is not best practice for all linux server as well.
Vladan SEGET says
Craig,
thx for the comment. That’s exactly what I’m saying. It’s not recommended. .. -:)
Akos Batorfi says
I’ve tried adding a user and granting it shell access, but unfortunately with 4.1 this doesn’t work anymore (it did with 4.0). The only thing that worked for me was doing a “usermod -a -G 0 username”. More info here: http://planetvm.net/blog/?p=1705