Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to transfer files from my Host OS (Windows 7) to Guest OS (CentOS) running on VirtualBox.

I tried using pscp but it gives the error: More than one remote source not supported

I tried ftp but it doesn't connect and I don't know why.

share|improve this question

migrated from Aug 16 '12 at 22:25

This question came from our site for professional and enthusiast programmers.

You can install Guest Additions:

and then use Shared Folders:

share|improve this answer
It's also possible to mount a vdi from the host (and access the guest operating system's files): – Anderson Green Nov 8 '12 at 3:35

You can do it with "scp" command, then the ssh daemon (sshd) has to be running on the Windows box as well.

Or use one of the windows scp clients to talk to the centos VM. You can transfer files either way using scp.

share|improve this answer
how do you identify the IP and credentials of the guest machine for the scp command? – ted.strauss Jan 7 '14 at 19:25

I have the exact same setup (Windows 7 Host OS, CentOS 6.5 Guest OS)...

(if you have SSH working on an IP address for CentOS, then you can skip this paragraph below)
I set Virtualbox to use bridged network adapter (Settings > Network > Adapter 1: set to bridged) and after installing Apache (set a hostname, and also turn off firewall with: service iptables stop). You can view the IP address given to you with ifconfig eth0 or narrow the ouput with ifconfig eth0 | grep 'inet addr' | awk '{print $2}'. This is the IP address that should also be in your /etc/hosts file on the same line with your hostname. For testing purposes, put an index.html file in /var/www/html (your web root). Then you should be able to browse to the VM at a local IP address: 192.168.x.x from a browser on your Windows 7 OS.

To transfer files back and forth, you can use WinSCP on your Windows 7 host OS. Create a new session with these settings in WinSCP:

File protocol: SFTP (this means you will be connecting via SSH)
Host name: 192.168.x.x (this is the ip address of your VM)
User name: root
Password: (leave this blank for security reasons...
           but when prompted during connecting you'll enter your root password 
           you set for CentOS)
Private Key file: (leave will be prompted to say 'yes' to accept the key)
share|improve this answer

You can use Samba for transferring files. Just install Samba, and then choose the Host OS and then the OS where the files are to be transferred.

share|improve this answer

You must log in to answer this question.