Last updated on October 19, 2019
Ubuntu and other variants of linux offers many free open source apps. Often, one may want to use some of these apps for testing purposes but it is not possible to always find available PCs to run linux. Using Virtualbox to run linux in virtual environment is a cost effective solution to overcome this problem. However, there may be situations where one may want to send or retrieve files to or from linux in Virtualbox. In this article, I will explain how to set up the Virtualbox and use scp to achieve this objective.
Setting Virtualbox Network
The first step is to set the Network setting of Virtualbox to Bridge Adapter
In Ubuntu/Linux Client
You will need the IP of Ubuntu VM. To get the IP, run this command in Ubuntu:
ifconfig -a
From your Mac host’s Terminal, you can send or receive a file using scp using the command scp {virtualmachine}@{ip}:{path of file} {destination directory} In my example, to copy privkey.pem from the VM to my host in the current firectory, I run
scp sim@192.168.100.34:/home/sim/privkey.pem .
Be First to Comment