Access VM Remotely Through PuTTY or MobaXterm

Accessing a virtual machine (VM) remotely is essential for managing servers, testing environments, and development systems. Whether your VM is hosted on Hyper-V, VMware, VirtualBox, Azure, or another platform, remote access allows you to control it without using the host machine’s console interface.

For Linux-based virtual machines, SSH (Secure Shell) is the most common remote access method. Tools like PuTTY and MobaXterm make it easy to establish secure SSH connections from a Windows PC. Both tools support password-based and key-based authentication, making them suitable for personal and enterprise use.

This guide explains how to access a VM remotely using PuTTY or MobaXterm, including necessary configuration steps and connection setup.

How to Access VM Remotely Through PuTTY or MobaXterm

Before starting, ensure the virtual machine is powered on and SSH is installed and running on the VM.

1. Install and Enable SSH on the Virtual Machine

Your VM must have an SSH server installed.

  1. Log into your Linux VM locally.
  2. Install OpenSSH server if not already installed.
  3. Start the SSH service.
  4. Enable SSH to start automatically on boot.
  5. Confirm SSH is running by checking its status.

Without SSH running, remote connections will fail.

2. Find the VM’s IP Address

You need the VM’s IP address to connect.

  1. Log into the VM.
  2. Open a terminal.
  3. Run: ip a
  4. Note the assigned IPv4 address.
  5. Ensure the VM is using a network adapter that allows external access (Bridged or NAT with port forwarding).

If using cloud VMs, obtain the public IP from the provider dashboard.

3. Allow SSH Through Firewall

The VM firewall must allow SSH traffic.

  1. Check firewall rules.
  2. Ensure port 22 is open.
  3. Restart firewall services if changes were made.

Blocking port 22 prevents remote access.

4. Access VM Using PuTTY

PuTTY is a lightweight SSH client for Windows.

  1. Download and install PuTTY.
  2. Open PuTTY.
  3. Enter the VM’s IP address in the Host Name field.
  4. Ensure Port 22 is selected.
  5. Choose SSH as the connection type.
  6. Click Open.
  7. Enter your username and password when prompted.

You should now have terminal access to your VM.

5. Use SSH Key Authentication in PuTTY (Optional)

Key-based login improves security.

  1. Generate an SSH key pair.
  2. Upload the public key to the VM’s ~/.ssh/authorized_keys file.
  3. Open PuTTY.
  4. Go to Connection > SSH > Auth.
  5. Browse and select your private key file.
  6. Save the session and connect.

This removes the need to enter a password each time.

6. Access VM Using MobaXterm

MobaXterm offers an advanced SSH client with built-in file transfer.

  1. Download and install MobaXterm.
  2. Open MobaXterm.
  3. Click Session.
  4. Choose SSH.
  5. Enter the VM’s IP address.
  6. Specify your username.
  7. Click OK.
  8. Enter your password or use SSH key authentication.

MobaXterm also provides SFTP file browsing automatically.

7. Configure Port Forwarding (If Using NAT)

If your VM is using NAT networking:

  1. Open your hypervisor’s network settings.
  2. Configure port forwarding from host port 22 to VM port 22.
  3. Use localhost and the forwarded port in PuTTY or MobaXterm.
  4. Connect using the forwarded configuration.

Without port forwarding, NAT-based VMs cannot be accessed externally.

8. Connect to Cloud Virtual Machines

For cloud-based VMs:

  1. Obtain the public IP address.
  2. Ensure the security group allows inbound SSH (port 22).
  3. Use PuTTY or MobaXterm with the public IP.
  4. Authenticate using the provided SSH key.

Cloud firewalls must allow SSH traffic explicitly.

9. Troubleshoot Connection Issues

If the connection fails:

  1. Verify the IP address is correct.
  2. Ensure SSH service is running on the VM.
  3. Check firewall rules.
  4. Confirm port 22 is open.
  5. Restart the VM and try again.

Network misconfiguration is the most common cause of connection errors.

Final Thoughts

Accessing a virtual machine remotely through PuTTY or MobaXterm is a secure and efficient way to manage Linux-based VMs from Windows. The key requirements are a running SSH server, correct IP address, open firewall port, and proper network configuration.

Posted by Raj Bepari

I’m a digital content creator passionate about everything tech.