VMware ESX and ESXi – tips and tricks
by Ali on Nov.11, 2008, under VMware
To clear connection history in VIC go to regedit and delete the line “RecentConnections” from HKEY_CURRENT_USER\Software\VMware\VMware Infrastructure Client\Preferences.
To allow root access to logon through ssh in ESX:
Logon to console as root
Edit sshd_config: nano /etc/ssh/sshd_config and change “PermitRootLogin” from “no” to “yes”
Restart ssh: service sshd restart
To allow root access to logon through ssh in ESXi:
Open console and press Alt+F1
Type "unsupported" and enter root password to log on
Open inetd.conf in vi: vi /etc/inetd.conf
Find the line that starts with #ssh, uncomment, save and close the file, and then restart services on your ESXi server: /sbin/services.sh restart
To allow non-root access to logon through ssh in ESXi:
Log on to console: press Alt-F1 (or through root ssh)
Edit inetd.conf: vi /etc/inetd.conf
Find this line: "ssh stream tcp nowait root /sbin/dropbearmulti dropbear ++min=0,swap,group=shell -i" and add -w to the end. Save and close the file.
Create the new users and home directory: useradd -d /home/username -P username
Reboot
To the extent possible under law, the creator has waived all copyright and related or neighboring rights to this work.
February 15th, 2009 on 4:51 AM
I found this helpfull, however, it seems esx 3i 3.5.0 build-123629 does not keep /home across a reboot.
adding “mkdir -p /home/username” to /etc/rc.local or something to that effect seems to work ok (but, file will be lost at reboot)
February 15th, 2009 on 11:39 AM
Correct. It seems to be an internal ESX setting. Personally I didn’t find having a non-root user on ESX helpful.
July 17th, 2009 on 9:02 AM
Starting with ESX 3.5 Update 2, services.sh restart no longer restarts the inetd service. You must type the following command at the console ps | grep inetd and press enter to get the process id for inetd. You will get something like 1299 1299 busybox inetd. The process id is, in this example, 1299. You will then type kill -HUP 1299 and press enter. This restarts inetd. You should now be able to gain root ssh access to the ESXi 3.5 Update 2 or above host. This worked with ESXi 4.0.
July 17th, 2009 on 9:51 PM
Thanks for update!