Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
VMware vCenter Cookbook

You're reading from   VMware vCenter Cookbook Over 65 hands-on recipes to help you efficiently manage your vSphere environment with VMware vCenter

Arrow left icon
Product type Paperback
Published in May 2015
Publisher Packt
ISBN-13 9781783553976
Length 302 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Kostantin Kuminsky Kostantin Kuminsky
Author Profile Icon Kostantin Kuminsky
Kostantin Kuminsky
Arrow right icon
View More author details
Toc

Table of Contents (9) Chapters Close

Preface 1. vCenter Basic Tasks and Features FREE CHAPTER 2. Increasing Environment Availability 3. Increasing Environment Scalability 4. Improving Environment Efficiency 5. Optimizing Resource Usage 6. Basic Administrative Tasks 7. Improving Environment Manageability Index

Accessing hosts via SSH

In certain cases, you may need to access the ESXi host via SSH. This may be needed to run a script, troubleshoot an issue, or use a command or a feature not available via vSphere Client.

How to do it...

SSH access to ESXi hosts is disabled by default and can be enabled using the ESXi console and command line or through vCenter. To enable it from vCenter:

  1. Allow SSH port through the host's firewall.
  2. Start the SSH service on the host.

Opening the SSH port on the firewall

To allow the SSH port through the firewall on the ESXi host, execute the following steps:

  1. Go to the Hosts and Clusters view.
  2. Select the host and go to the Configuration tab.
  3. Click on Security Profile on the left.
  4. Click on the Properties... link next to the Firewall section.
    Opening the SSH port on the firewall
  5. The Firewall Properties window will open. Check SSH Server under the Secure Shell section.
    Opening the SSH port on the firewall
  6. Click on the Firewall button to allow only certain IP addresses to connect. Click on OK when finished to apply the changes.

In Web Client, perform the following steps:

  1. Select a host.
  2. Go to Manage | Settings | Security Profile.
    Opening the SSH port on the firewall
  3. Click on the Edit... button next to the Firewall section.
  4. Select the SSH Server option and click on OK as shown in the next screenshot.

    Tip

    To allow connections from only certain IP addresses, uncheck the Allow connections from any IP address option and enter the IP addresses separated by commas.

    Opening the SSH port on the firewall

Starting an SSH service

To start an SSH service on the host from the same place under Configuration | Security Profile:

  1. Click on the Properties... link next to the Services section.
  2. Select SSH in the list of services and click on Options....
    Starting an SSH service
  3. Click on the Start button.
  4. Once the service starts, both windows can be closed.

From Web Client, perform the following steps:

  1. Select a host.
  2. Go to Manage | Settings | Security Profile.
  3. Scroll down to the Services section.
    Starting an SSH service
  4. Click on the Edit button.
  5. Select SSH from the list.
  6. Click on Start.
    Starting an SSH service

There's more…

Now you will be able to access the ESXi command line using the SSH client.

Note

Note that when SSH service is running on the host, vCenter marks it with a yellow exclamation mark as it is a configuration issue. Enabling SSH is considered to be an insecure practice.

There's more…
You have been reading a chapter from
VMware vCenter Cookbook
Published in: May 2015
Publisher: Packt
ISBN-13: 9781783553976
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image