How to: SSH into a Linux Virtual Machine with PuTTY in Windows 11/10


4 min read

How to: SSH into a Linux Virtual Machine with PuTTY in Windows 11/10

“What is a Linux VM? And what exactly are you trying to do here? 🤔”

A Linux VM, or virtual machine, is a virtualized environment that runs a Linux operating system on top of your existing Windows system. It allows you to run Linux applications and software without needing to install a separate physical machine or partition your hard drive. This can be useful for developers, system administrators, or anyone who needs to test Linux applications or environments without having to use a separate physical machine.

In this guide, I will show you how to run a CLI Linux environment (for this, I’ll be using the good ol’ Ubuntu) using SSH all within the Windows Operating System.

“But WSL exists, why would I want to use a separate Linux VM? 🙄”

While WSL is a fantastic tool, it has some limitations when it comes to running a full Linux environment. WSL is not a true Linux kernel, and as such, some applications may not run as expected. Additionally, some software may require a full Linux environment to run correctly. In these cases, a Linux VM can be more useful and provide a more complete Linux experience.

I use a Lubuntu VM for my Open Source Contributions so that I don’t pollute my WSL environment with unnecessary packages while bug hunting, testing and adding new features.

“What about a Nix environment? Isn’t that much better than a slow and sluggish virtual machine? 🤓”

Nix environments are a great alternative to virtual machines, but they may not be suitable for everyone. While they are generally faster and more lightweight than virtual machines, they also require a bit of a learning curve and may not be as compatible with all software. It ultimately depends on your specific use case and preferences. If you're comfortable with Nix and it meets your needs, then it may be a better option than a virtual machine. I will cover Nix in another article in the future. Stay tuned!

“Now what the hell is PuTTY? It sounds so goofy 😅”

PuTTY is a free and open-source terminal emulator, serial console, and network file transfer application. It allows you to establish a secure SSH connection to your Linux VM from your Windows machine.

“Alright, let’s stop with the technical jargon. Tell me how to operate a Linux VM through my native Windows environment”

Pre-setting up the Linux virtual machine:

  1. Assuming you use Oracle VM Virtual Box, it should work with almost any VM software. Start by setting up your Ubuntu install. For me it’s Lubuntu, but it’s the same process with regular Ubuntu. If you don’t know how to do it, check out this awesome guide here

  2. Click on “Settings” → “Network”. You should see something like this.

  3. Now click on “Attached to:” and select the “Bridged Adapter” option. Then click on “Advanced”.

  4. Now, make sure “Allow All” is selected in the “Promiscuous Mode”.

  5. Click “OK” and close the window.

Setting up PuTTY:

  1. Download PuTTY from its official website. For me, it was the "64-bit x86" msi.

  2. Open up PuTTY and you should see the PuTTY Configuration pop up.

  3. Now start up your Ubuntu virtual machine in Virtual Box.

  4. Now, go to your Linux terminal. Your terminal might look a lot different because I’m using Lubuntu, but the process is exactly the same. Enter the command ifconfig and press Enter. Then take note of the IP address of your virtual machine instance.

  5. Paste that address in the PuTTY configuration and make sure these options are selected. Then, press the open button.

  6. Now paste in your Ubuntu virtual machine username, so that you can log into that particular user. For me it’s “fibzoss”. If you don’t know your username, type whoami in your Ubuntu terminal, the output will be your username. After you’ve entered both your username and password, press Enter.

  7. You’ll be greeted by your default Linux shell inside of PuTTY and now you can essentially control your VM through this native Windows instance. To test if everything is working, make a random folder inside PuTTY with mkdir and see if it appears in the Virtual Machine too. You can also minimize or lock your virtual machine and still be able to use it via PuTTY.

So there you have it. Now that you've successfully connected to your Linux VM via SSH using PuTTY, you can easily access and control your VM from your Windows machine.


Now that you've successfully connected to your Linux VM via SSH using PuTTY, you can easily access and control your VM from your Windows machine. Whether you're a developer, system administrator, or just someone who wants to test out a Linux environment, a virtual machine can be a great option. With PuTTY, you can establish a secure connection and control your VM all from within your native Windows environment.

Follow and like for more no-bs articles like this one!