VMware ESX and ESXi – tips and tricks

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

CC0 1.0 To the extent possible under law, the creator has waived all copyright and related or neighboring rights to this work.

4 thoughts on “VMware ESX and ESXi – tips and tricks

  1. Bjorn says:

    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)

  2. Frank Cabreja says:

    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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.