1. Inside the VM (Guest)

Make sure the SSH service is installed and active:

Install: sudo apt install openssh-server

Check Status: sudo systemctl status ssh

2. In VirtualBox Settings (Host)

Go to your VM Settings > Network > Advanced > Port Forwarding, then add a new rule:

Name: SSH

Protocol: TCP

Host IP: 127.0.0.1

Host Port: 2222

Guest Port: 22 (Leave the Guest IP blank).

3. How to Access

Open Terminal/PowerShell on the main PC (Host), then type:

Bash

ssh -p 2222 username_vm@127.0.0.1

WRITE MY PAPER


Leave a Reply