Monday, October 29, 2012

Throwback Skills - Enable SSH on VMware ESX3.5

 
 
So... I found myself the other day needing to SSH into a VMware 3.5 host and was reminded of how spoiled us VMware dudes are these days to be able to enable SSH in the GUI/vCenter etc. as we are in current vSphere versions (4, 4.1, 5. 5.1)
ESXi 3.5 does have the ability to run SSH, but it is disabled.

***Additionally it is not supported by VMware.
So here's the scoop on what you need to do in order to set it up:
Log into the console of the ESXi host and press ALT-F1. This will open the console window.
Once you are in the console window, enter the word "unsupported" and press Enter (Note - You will not see the text your typing)

Following this you will see the a "Tech Support Mode" warning and a prompt for a password. This will be the password for the Root login of the host.
You will be brought to the prompt of ~ #.
 
Now you will need to edit the file named inetd.conf:  To do this enter the command "vi /etc/inetd.conf" (No quotes)
 
Perform the following steps:

Find the line that begins with #ssh and remove the #. then save the file by moving the cursor down to #ssh line and then press the Insert key.
 
Move the cursor over one space and then hit backspace to delete the #.
 
Then press ESC and type in :wq to save the file and exit vi.
 
If you make an error in typing, press the ESC key and then type it :q! to quit vi without saving the file.

The vi editor should be closed now.

Now you just need to restart the management services on the host. Back at the command prompt, run the command /sbin/services.sh restart.

You'll now be able to connect to the ESXi host with a SSH client.
***Of course if all you need to do is perform some command line stuff at the physical console of the ESXi host you can just go the ALT-F1 > Unsupported route and fire away!

Enjoy!

Tuesday, October 23, 2012

Configuring Network Settings From The Command Line Using NETSH


 
 
 
So recently we were tasked with performing a network configuration change for a customer that had the need to add multiple IP addresses to their network card on server all in remote sites. Logging into each one of these machines via RDP (Windows servers) in this scenario would have been tedious..
 
Do you have the need to locally or remotely, display or modify the network configuration of a computer/server? do you prefer the streamline of the command-line? 
 
If so then the NETSH command can prove useful for you.
 
 NETSH also provides a scripting feature that allows you to run in batch mode.
 
If you are looking to script against a multiple numbers of machines then NETSH additionally can save a configuration script in a text file to replicate outputs/setting changes to other servers.
 
There are many commands and switches contained within the NETSH command. 
 
By typing the "/?" switch for NETSH, the help menu which is actually quite helpful can be accessed..
 
 
 
Enjoy!