<img src="//bat.bing.com/action/0?ti=5794969&amp;Ver=2" height="0" width="0" style="display:none; visibility: hidden;">

VMware - Enable SSH by Root and Connecting via SSH (CLI)

[fa icon="long-arrow-left"] Back to all posts

[fa icon="pencil'] Posted by Lewan Solutions [fa icon="calendar"] February 4, 2009

ESX 3.5 has a command line interface called the Service Console, which you can SSH (Secure Shell) into in order to manage ESX or to run commands/scripts. This is how you connect to ESX 3.5 via SSH.

Why Can I Not Login as Root Automatically?

By default, SSH is turned on for ESX 3.x installations however the “root” user is denied from logging into the server as a security precaution. We will need to enable the root user to login by editing a configuration file and restarting the SSH services to take into effect the change.

Login via Console

media-1230596722517.png

On the console of the server, press ALT and F2 buttons to show a login prompt. Log in as root.

Make a Backup of SSH Config File

media-1230596846078.png

First we’ll save a copy of the /etc/ssh/sshd_config file as /etc/ssh/sshd_config.original in case we need a backup. Type in the following:
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original

Open SSH Config File

media-1230597001567.png

Next we’ll edit /etc/ssh/sshd_config using a notepad-like program called Nano. Type in the following:
nano /etc/ssh/sshd_config
Find the line that says:
PermitRootLogin no

Edit SSH Config File

media-1230597079733.png

Change the line to read:
PermitRootLogin yes

Now save the file and exit by pressing CTRL and X.

Restart SSH Service

media-1230597174611.png

Next, restart the SSH daemon (service) by typing:
service sshd restart

Connecting through SSH via Putty

media-1230597466415.png

To connect via Secure Shell (SSH), you’ll need to use a SSH program, like Putty. Putty is widely known and used since it’s a free open source program. A copy of Putty can be downloaded off the internet by searching Google for “putty ssh download”. Putty is a standalone executable program which does not require installation. I usually copy it to My Documents or a network share and then place a Shortcut on my Desktop or Quick Launch bar. Once downloaded, go ahead and start Putty.
Then type in the IP address of the ESX server into the address location field as shown. You can also type in the IP address and give it a name under ‘Saved Sessions’ and then press “Save”. This will create a session you can easily load by selecting the name and pressing “Load”. This makes it easy so you don’t have to remember IP addresses of your different ESX servers.

Logon to ESX Server

media-1230597639815.png

Once you connect to the server, you’ll need to login as “root”. Type your password (it will not be displayed on the screen). When you login, it will show you the host where root last logged in from and then it will display a command prompt where you can issue commands.

Topics: VMware, How To Guide

Lewan Solutions
Written by Lewan Solutions

  • View & Submit Comments

[fa icon="envelope"] Subscribe to Email Updates



[fa icon="comments-o"] Follow us

Get even more great content, photos, event info and industry news.



[fa icon="calendar"] Recent Posts