blog posts

How to Enable SSH on VMware ESXi?

Enable SSH on ESXi

Remote access to ESXi servers is essential for maintaining and managing a VMware environment. The ESXi interface can be accessed via SSH. For example, we are using PuTTy as a Secure Shell client. But this option is disabled by default to prevent security risks such as brute force attacks.

Enabling SSH on VMware ESXi servers is simple in a few steps…

This tutorial will teach you two simple ways to SSH into an ESXi server.

What is ESXi?

ESXi is a first-type virtualizer from VMWare company. Which is placed as an operating system on your computer or server hardware, and its task is to control and allocate server resources.

This operating system provides you with a web panel. You can connect to it using the IP assigned to it during installation. In that panel, you can install and manage virtual machines.

prerequisites

  • SSH client on the remote machine
  • Root access to the ESXi server
  • Admin account for vSphere Web Client

How to enable SSH on ESXi (2 methods)

 

Before we start, let’s test if this feature is disabled in ESXi by default.

If you get a “Connection refused” error when trying to connect to your ESXi server, it means that SSH is disabled.

Method 1: Enable SSH in ESXi via vSphere Web Client

In this method, we first login to our ESXi server. Then we activate SSH

1. Select the Manage option in the left Navigator menu.

2. Click the Services tab on the right.

3. Look for TSM-SSH in the list that opens for you. As you can see, the status of the service is disabled or Stopped.

4. Select it and click Start on the top menu.

Second method: Enable SSH in ESXi through vCenter

Non-BMC users can use the Web Client to log into vCenter and enable SSH.

After logging in, select the host and follow the following steps:

1. Go to the Configure tab.

2. Scroll down and select Profile Security under System.

3. Find the Services section and click the Edit button.

 

4. Find SSH in the list and click on it. Click Start to enable SSH.

ESXi SSH connection test

Finally, once you have SSH enabled, open the SSH client and try to connect to your server. Use the root user to log in.

You will not see the “Connection refused” message if the SSH setup is successful.

Conclusion

In this tutorial, we will try to enable SSH in ESXi in 2 ways. But if you are not going to access the server this way for a while, we recommend disabling SSH due to security issues.