Connecting to your VMware virtual machine’s Linux operating system via SSH is simple, but it’s not as straightforward as connecting to a Linux VPS.
In this short tutorial we’ll quickly cover how to configure your Linux guest VMware virtual machine and retrieve the information you need to connect from your host machine.
Before you can connect with SSH, you need:
- VMware Workstation/Player installed on your Windows host computer.
- A Linux virtual machine created in VMware.
- SSH enabled and open on port 22 in the Linux VM.
Configure Bridged Networking
To allow your VM to be accessible over SSH, it needs to have a bridged network connection:
- In VMware, right-click on the Linux virtual machine in the sidebar and go to Settings > Network Adapter.
- Change the network connection from NAT to Bridged. This gives your VM an IP address on your local network.
Find the Linux IP Address
After enabling bridged networking, you need to find the IP address assigned to your Linux VM:
- Start the Linux virtual machine.
- Log into the Linux VM.
- Run the following to list the IP addresses.
- Look for the IP address in the
inetsection of the
Connect with SSH
With the IP address, you can now open an SSH connection from your Windows host OS:
- On Windows, open the command prompt or a terminal like PuTTY, and on Linux/Mac you can use the terminal.
- Connect to the Linux VM IP address with
ssh username@ip_address(replace username and IP).
- Enter the password when prompted to log in.
You are now connected to the Linux virtual machine terminal for remote management!
If you only see IPv6 addresses, reboot the Linux VM and run
ip a again to get the IPv4 address needed for SSH.