How to SSH or Share a folder with CentOS host

Discussions about using Linux guests in VirtualBox.
Post Reply
rjo98
Posts: 59
Joined: 6. Jul 2009, 17:32
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: XP, CentOS, Fedora

How to SSH or Share a folder with CentOS host

Post by rjo98 »

This is my first venture into making a CentOS virtual machine from my Windows host. I installed CentOS fine, did the Guest Additions which did everything except the last part because X isn't installed. I turned Shared Clipboard and Drag&Drop on in the menu but those don't seem to work still. I installed webmin and can't connect to that via the ip address that ifconfig -a shows me, I can't scp to that IP either. I even did a chkconfig iptables off on the virtual server thinking that might be blocking it.

At this point I'm guessing I did something wrong or didn't do something I should have. Any tips? I'm hoping to be able to easily move files from my Windows host to the Linux vm for testing purposes, either via drag&drop or scp'ing them over.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How to SSH or Share a folder with CentOS host

Post by Perryg »

Shared Clipboard and Drag&Drop won't work as they need X.

Shared folder should if you set it up properly, or you can use a network share by setting the adapter type to host-only or bridged if you have a router in your LAN.

See chapters 4 and 6 in your VirtualBox users manual.
rjo98
Posts: 59
Joined: 6. Jul 2009, 17:32
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: XP, CentOS, Fedora

Re: How to SSH or Share a folder with CentOS host

Post by rjo98 »

Yup, Shared Folder worked like a charm. Figured I would ask about the other ones before I tried that one since I wasn't having much luck either way.

Any thoughts on why I wouldn't be able to SCP or connect to webmin at that IP though? is it how the networking is setup for the virtual machine? unfortunately my local LAN is a 10.x and so is the IP this vm received, so maybe that's why.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How to SSH or Share a folder with CentOS host

Post by Perryg »

if you left the default settings for the network you are using VBox NAT which is not going to work for SCP or SSH out of the box. You would need to port forward (explained in the manual Chapter 6)

Your 10.x means nothing to me. If you have a router in your LAN use bridged. If not setup a second adapter with host-only.
Post Reply