How to establish SSH connection to a virtual server (Centos) installed on VirtualBox.

After seeing how it can install pe (), we will try to see how we can connect through (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“.

Bridged Adapter

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

Network Configuration

In “Network Configuration” open “Edit Devices“.

Edit Devices

Normally only ETH0 must appear in the list of devices.

etho - DHCP

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

Use DHPC

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

New Device

Ethernet & Add

Ethernet

4. On the new device we set the following:

eth0 Settings

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 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
ifcfg

Ctrl+X > Y & Enter to save the changes.

6. Restarting network.

service network restart

or

/etc/init.d/network restart
restart network centos

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

puTTY VirtualBox CentOS

Now we can administer the virtual server on any computer in . We can use it as , ftp server, etc…

Pornid the services (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 RDS PPPoE.

Founder and editor Stealth Settings, din 2006 pana in prezent. Experienta pe sistemele de operare Linux (in special CentOS), Mac OS X , Windows XP > Windows 10 si WordPress (CMS).

Home Your source of IT tutorials, useful tips and news. How to establish SSH connection to a virtual server (Centos) installed on VirtualBox.
Leave a Comment