Skip to content

Instantly share code, notes, and snippets.

@kanmeiban
Last active August 29, 2015 14:18
Show Gist options
  • Save kanmeiban/2b0179509efa6c4ebd5b to your computer and use it in GitHub Desktop.
Save kanmeiban/2b0179509efa6c4ebd5b to your computer and use it in GitHub Desktop.
SSH into guest CentOS installed in VirtualBox on Mac OS X host
  1. Stop virtual machine if it's running.
  2. Under Settings -> Network -> Adapter 2 select Attached to: Host-only Adapter
  3. Start the virtual machine
  4. In the virtual machine, edit /etc/sysconfig/network-scripts/ifcfg-eth1:

DEVICE=eth1 HWADDR=08:00:27:21:b3:8b # Copy address from Adapter 2 settings. # Beware, Mac address is shown without colons there. TYPE=Ethernet ONBOOT=yes BOOTPROTO="static" IPADDR=192.168.59.103 NETMASK=255.255.255.0 ```

  1. sudo service network restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment