CentOS Install SSH server and configure for VirtualBox testing
I'll be using a fresh install of a CentOS Minimal 6.5. And a Mac Book Pro with VirtualBox installed (as my testing environment).
First after install of a clean CentOS you need an SSH server to work in your usual environment. So to connect to a Linux, installed in a VirtualBox you will need basically 2 things:
- openssh-server install
- disable firewall
- VirtualBox Port configuration/Access configuration
OpenSSH server installTo install server you need to run in your VirtualBox Guest system (CentOS VM):
And start and add it to auto launch at system startup:
Also make sure port 22 is opened in your VM. type:
Firewall settingsBecause it's a VM you can simply disable the firewall. But be sure not to do this at deployment/production server of any kind.
To disable firewall and remove from auto lunch at system startup run:
VirtualBOXTo connect your Guest machine to your Host machine (basically up a network between virtual CentOS and your host Mac OS (In my case) you have several options.
I'll stop on a simple one. You may do a Bridged network connection and have your router/whatever assign your VM an IP address inside your network.
ConnectNow you need to reboot your CentOS or either reboot network inside your VM. As a result, after reboot you should get assigned IP address. You can view it using command:
Mine got an IP ending with 104.
And so now you can ssh connect to your VM terminal using something like:
Tadaa! Your system is up and ready for experiments. Just be sure to save your state with VM snapshots ;)