I installed Ubuntu using VirtualBox on Windows.

It is not very convenient to use ubuntu terminals in VirtualBox, for example, I want to copy some commands to ubuntu terminals in Windows. Putty supports this cross-system copy-and-paste operation by default. VirtualBox does not have the ability to adjust the font size in console, but Putty can easily change the font size in Console.

How do I use Putty to connect to an Ubuntu system installed on a local VM?

(1). Ubuntu virtual machine network is set to NAT mode:

(2). Select advanced mode and open Port Forwarding:

Maintain the following rule:

(3). Open Putty and create a new login session. Enter the Host IP and Host Port maintained in VirtualBox. Select SSH as the connection type

(4). Install SSH Server in VirtualBox ubuntu:

sudo apt-get install openssh-server

Start the SSH service:

Ensure that the SSH service is successfully started.

Then you can use Putty to log in to Ubuntu installed in VirtualBox:

For more of Jerry’s original technical articles, please follow the public account “Wang Zixi” or scan the following QR code: