Monday, February 26, 2007
Root Access
Being tired of installing ESX 3.0.1 and forgetting to enable remote root access all the time, I decided to write a small free utility to automate the root access enabling. The utility uses a combination of native SOAP API and ssh to modify the /etc/ssh/sshd_config file and enable or disable the remote root access to the ESX server.
The tool will also optionally create an ordinary non-root account on the ESX server. The regular account created by the utility can be used to remote access the ESX server using an ssh client.
How it works:
The tool connects to the ESX server using root credentials through SSL on port 443. This is similar to how VMware infrastructure client connects to the server. The same API is used to create an ordinary account on the ESX server.
In order to enable or disable the remote root access, the tool uses ssh under an ordinary account. After ssh session is established, the program issues ‘su’ command and executes a perl script (sshdcfg.pl) to change the PermitRootLogin setting in the /etc/ssh/sshd_config file.
I hope the utility will make my life a little bit easier.
Download: http://www.veeam.com/download/veeam_rootaccess.msi
The tool will also optionally create an ordinary non-root account on the ESX server. The regular account created by the utility can be used to remote access the ESX server using an ssh client.
How it works:
The tool connects to the ESX server using root credentials through SSL on port 443. This is similar to how VMware infrastructure client connects to the server. The same API is used to create an ordinary account on the ESX server.
In order to enable or disable the remote root access, the tool uses ssh under an ordinary account. After ssh session is established, the program issues ‘su’ command and executes a perl script (sshdcfg.pl) to change the PermitRootLogin setting in the /etc/ssh/sshd_config file.
I hope the utility will make my life a little bit easier.
Download: http://www.veeam.com/download/veeam_rootaccess.msi