Create a virtual machine as explained in How to Create Virtual Machines.
Accessing Linux VM from Windows
To access a Linux VM from a Windows machine, you typically use SSH (Secure Shell) or remote desktop protocols. Here’s how to do it:
Prerequisites:
- Linux VM IP Address: Ensure you know the IP address of the Linux VM.
- SSH Enabled: Ensure the SSH service is running on the Linux VM (default port: 22).
- Credentials: Have the username and password (or SSH key) for the Linux VM.
Method 1: Access Linux VMs Using PuTTY (SSH Client)
1. Download PuTTY:
- Download PuTTY from putty.org and install it on your Windows machine.
2. Open PuTTY:
- Launch PuTTY and enter the IP address of the Linux VM in the “Host Name (or IP address)” field.
- Ensure the port is set to
22
(default SSH port).

3. Connect:
- Click “Open” to start the connection.
- If prompted with a security alert about the server’s key, click “Accept.”
4. Login:
- Enter the username(e.g. root) and password when prompted.

- If using an SSH key, configure the key in PuTTY under “Connection > SSH > Auth.”
Method 2: Accessing Linux VMs Using Windows Terminal/PowerShell
- Launch Windows Terminal/PowerShell:
- Run SSH Command:
ssh username@<Linux_VM_IP>
Replaceusername
with your Linux VM username and<Linux_VM_IP>
with the VM’s IP address. - Authenticate:
- Enter the password when prompted.
- If using an SSH key, ensure the key is stored in the default
.ssh
directory on your Windows machine.

Method 3: Using Remote Desktop (if GUI access is required)
- Install Remote Desktop Server on Linux VM:
- Install a desktop environment (e.g., GNOME, XFCE) and a remote desktop server (e.g., xrdp) on the Linux VM.
sudo apt update sudo apt install xrdp
- Configure xrdp:
- Start the xrdp service:
sudo systemctl enable --now xrdp
- Connect via Remote Desktop:
- Open the Remote Desktop Connection app on Windows.
- Enter the IP address of the Linux VM and click “Connect.”
- Login with your Linux VM credentials.
Accessing Linux VM from Linux
Accessing a Linux VM from another Linux machine is straightforward using SSH or SCP for file transfers.
Prerequisites:
- Linux VM IP Address: Ensure you know the IP address of the Linux VM.
- SSH Enabled: Ensure the SSH service is running on the Linux VM (default port: 22).
- Credentials: Have the username and password (or SSH key) for the Linux VM.
Method 1: Accessing Linux VM using SSH
1. Open Terminal:
- Launch a terminal on your local Linux machine.
2. Run SSH Command:
ssh username@<Linux_VM_IP>
Replaceusername
with your Linux VM username and<Linux_VM_IP>
with the VM’s IP address.
3. Authenticate:
- Enter the password when prompted. If using an SSH key, ensure the key is stored in the ~/.ssh directory and set proper permissions:
chmod 600 ~/.ssh/id_rsa
Method 2: Using GUI Tools (Optional)
Cockpit
Paste the IP address in the browser

Login successful via Cockpit

Troubleshooting
Common Issues:
- Connection Refused:
- Ensure the SSH service is running on the Linux VM:
sudo systemctl status ssh
- Ensure the firewall allows SSH:
sudo ufw allow ssh
- Ensure the SSH service is running on the Linux VM:
- Authentication Failure:
- Verify the username and password.
- If using an SSH key, ensure it is properly configured and permissions are set to
600
.
- Timeout Issues:
- Verify the Linux VM is running and accessible via the network.
- Check network configurations and routes.
By following these steps, you can access your Linux VM from both Windows and Linux environments efficiently.