If you are facing a "Connection Refused" error when trying to connect to a VMWare Workstation Guest running Rocky Linux using PuTTY, don't worry! This article will guide you through the troubleshooting steps to resolve this issue.
1. Check Network Configuration:
The first thing you need to verify is that your VMWare Workstation Guest is correctly configured to connect to the network. Follow these steps:
- Open the VMWare Workstation application.
- Select your Rocky Linux guest virtual machine.
- Go to the "Edit" menu and click on "Virtual Network Editor".
- Ensure that the network adapter for the guest is set to "Bridged" mode or "NAT" mode.
- Click on "OK" to save the changes.
2. Check Firewall Settings:
Firewalls can sometimes block incoming connections, causing the "Connection Refused" error. To check your firewall settings:
- On your Rocky Linux guest, open the terminal.
- Type the following command to check the firewall status:
sudo firewall-cmd --state - If the firewall is active, you can temporarily disable it using:
sudo systemctl stop firewalld - Try connecting to your VMWare Workstation Guest using PuTTY again.
- If the connection succeeds, it means the firewall was causing the issue. You can then configure your firewall to allow incoming SSH connections.
3. Verify SSH Service:
Make sure the SSH service is running on your Rocky Linux guest. Follow these steps:
- Open the terminal on your Rocky Linux guest.
- Type the following command to check if the SSH service is running:
sudo systemctl status sshd - If the service is not running, start it using:
sudo systemctl start sshd - Enable the SSH service to start automatically on boot:
sudo systemctl enable sshd
4. Check SSH Configuration:
Ensure that the SSH configuration on your Rocky Linux guest allows remote connections. Follow these steps:
- Open the terminal on your Rocky Linux guest.
- Edit the SSH configuration file using the following command:
sudo nano /etc/ssh/sshd_config - Look for the line that says "
#Port 22". Remove the "#" symbol to uncomment the line if necessary. - Save the changes and exit the editor.
- Restart the SSH service to apply the configuration changes:
sudo systemctl restart sshd
5. Verify SSH Port:
By default, SSH uses port 22 for connections. However, if you have changed the SSH port, you need to ensure that PuTTY is configured with the correct port number:
- Open PuTTY on your local machine.
- In the "Session" category, enter the IP address or hostname of your Rocky Linux guest.
- Go to the "Connection" category and enter the SSH port number in the "Port" field. If you haven't changed the default port, leave it as 22.
- Click on "Open" to initiate the connection.
After following these troubleshooting steps, you should be able to connect to your VMWare Workstation Guest running Rocky Linux using PuTTY without encountering the "Connection Refused" error.
| Reference | Link |
|---|---|
| VMWare Workstation Documentation | https://docs.vmware.com/en/VMware-Workstation-Pro/index.html |
| Rocky Linux Documentation | https://rockylinux.org/docs/ |
| PuTTY Documentation | https://www.putty.org/ |