How to Access Virtual Machines with PuTTY and MobaXterm: Step‑by‑Step Guide
Introduction
This article walks you through the complete process of connecting to Linux virtual machines (CentOS and Debian) running inside VirtualBox using two popular SSH clients – PuTTY and MobaXterm. You will learn how to configure the virtual network, obtain the VM’s IP address, enable the SSH service, and customize the client interfaces for a smoother workflow.
1. Preparing the Virtual Machine
- Install VirtualBox and create a VM (CentOS or Debian).
- Open the VM’s Terminal and run:
ifconfig(CentOS) orip a(Debian) to list network interfaces.- Note the IP address shown next to the active interface (e.g.,
192.168.1.35). - If the VM cannot be reached, change the network mode:
- In VirtualBox, go to Settings → Network.
- Switch Attached to from NAT to Bridged Adapter.
- Save and reboot the VM (
rebootcommand). - After reboot, run the IP‑checking command again to obtain the new address.
2. Connecting with PuTTY
- Download PuTTY from
https://www.putty.organd install the MSI. - Launch PuTTY and enter the VM’s IP address in the Host Name field.
- Keep the default Port 22 (SSH) and click Open.
- The first connection will show a security certificate warning – click Accept.
- Log in with the username you created (e.g.,
pol) and its password. - Optional: customize appearance via Window → Appearance (font size, colors) for better readability.
3. Enabling SSH on the VM (if not already running)
- CentOS:
bash sudo yum install openssh-server sudo systemctl enable sshd sudo systemctl start sshd sudo systemctl status sshd # should show active (running) - Debian:
bash sudo apt update sudo apt install openssh-server sudo systemctl enable ssh sudo systemctl start ssh sudo systemctl status ssh # verify it is active - After enabling the service, repeat the PuTTY connection steps.
4. Using MobaXterm as an Alternative
- Download MobaXterm (Free or Portable edition) and run the executable.
- Click Session → SSH, paste the VM’s IP, set User name (e.g.,
pol), and keep Port 22. - Accept the host key when prompted and enter the password.
- MobaXterm opens a tabbed terminal with a built‑in X‑server, making it handy for graphical applications.
- You can open multiple sessions side‑by‑side, switch between them instantly, and even copy‑paste between tabs.
5. Tips for Efficient Multitasking
- Full‑screen mode: Both PuTTY and MobaXterm support full‑screen (F11) for a distraction‑free view.
- Font customization: Larger, bold fonts improve legibility on high‑resolution monitors.
- Session saving: Store the IP, username, and preferred settings in PuTTY’s Saved Sessions or MobaXterm’s Saved sessions for one‑click reconnection.
- Parallel sessions: Open separate tabs for each VM (CentOS, Debian) and switch instantly, enabling true multitasking.
6. Verifying the Connection
- Run a simple command like
pwdorcat /etc/os-releaseto confirm you are inside the remote VM. - Use
ssh -v user@IPfrom a local terminal for detailed debugging if connections fail.
7. Common Issues & Fixes
| Problem | Cause | Fix |
|---|---|---|
| Connection timed out | Wrong IP or NAT mode | Switch to Bridged Adapter and reboot VM |
| “Permission denied (publickey,password)” | SSH service not running | Install/enable openssh-server and start the daemon |
| Host key verification error | Host key changed after VM reboot | Delete the old entry from ~/.ssh/known_hosts (PuTTY) or accept the new key |
Conclusion
By configuring VirtualBox to use a bridged network, installing and enabling the SSH daemon inside the VM, and using either PuTTY or MobaXterm, you can reliably access any Linux virtual machine from a Windows host. Customizing the client appearance and saving sessions further streamlines daily administration tasks.
With the right network settings and a few simple commands, PuTTY and MobaXterm turn any Windows workstation into a powerful remote‑management console for Linux VMs, eliminating the need for complex setups.
Frequently Asked Questions
Who is M Prashant on YouTube?
M Prashant is a YouTube channel that publishes videos on a range of topics. Browse more summaries from this channel below.
Does this page include the full transcript of the video?
Yes, the full transcript for this video is available on this page. Click 'Show transcript' in the sidebar to read it.
Helpful resources related to this video
If you want to practice or explore the concepts discussed in the video, these commonly used tools may help.
Links may be affiliate links. We only include resources that are genuinely relevant to the topic.