After seeing how it can install Centos pe VirtualBox (tutorial), we will try to see how we can connect through SSH (via putty) to the virtual system.
How we can connect via SSH to CENTSOS 5.6 / 6 (virtual server) installed on VirtualBox.
1. First of all we will have to make the settings of networking on VirtualBox. Before starting the system of Centos, we select it and click the button “Settings” from virtualbox. We go to “Network” and in the tab “Adapter 1” we select “Bridged Adapter“.

2. We start the operating system and open the terminal. Give the order “setup” We go to Network Configuration.

In “Network Configuration” open “Edit Devices“.

Normally only ETH0 must appear in the list of devices.

Using a connection to RDS (pppoe) through one router, the ETH0 It is good to leave the connection through DHCP.

3. In “Network Configuration” > “Edit Devices” we select “New Device“.

Ethernet & Add

4. On the new device we set the following:

“Static IP” will be the IP that we will log in via SSH to virtual server. “Default Gateway IP” It will be the IP of the router (in our case. It can differ. ipconfog /all in command prompt to see what your ip is)
OK > Save > Save & Quit > Quit.
5. We go to /etc/sysconfig/network-scripts/ and we edit the newly created file: ifcfg-eth0:0
Order in the terminal:
nano /etc/sysconfig/network-scripts/ifcfg-eth0:0
In ETH0: 0 We will find the lines with the settings made in point 4, to which we add the line:
ONPARENT=yes

Ctrl+X > Y & Enter to save the changes.
6. Restarting network.
service network restart
or
/etc/init.d/network restart

After we receive confirmation that all networking devices work OK, we go on our operating system (Windows XP, Vista or Windows 7) and we open PuTTY. At Host Name (or IP Address) we pass the static IP set to point 4 and open the session.

Now we can administer the virtual server on any computer in LAN. We can use it as web server, ftp server, etc…
Pornid the services Apache (service httpd start) We can also access it from the web interface, typing http: //192.168.2.9 in the browser's address bar.
Connect to VirtualBox CentOS via SSH – Settings & Configuration.
The tutorial was made on Windows 7 Ultimate (Basic System), VirtualBox, Centos 5.6 – Server & Desktop Gnome (installed on VirtualBox), Wireless LAN connection, SMC router, connection Internet RDS PPPoE.