How to SSH into a Virtual Machine in Parallels Desktop

I was pulling my hair out the other day trying to connect to a VM in Parallels Desktop. It’s fairly straightforward, yet rather complex at the same time. Here’s how to do it step by step.

In this example I’m running Parallels Desktop 8 under Mac OS X 10.9 Mavericks, and my Guest OS CentOS 6.5.

Configuring your VM

Before starting the VM, start Parallels Desktop and head over to

  • Virtual Machine
  • Configure
  • Hardware
  • Network

You’ll get to a screen like this:

Screen Shot 2014-02-12 at 17.21.16

Make sure the tick box is “Connected”. Under Type you get a drop-down menu with three options:

  • Shared Network: gives your VM access to your internet/network connection, much like a “split”
  • Bridged Network (with several options): creates a new IP address for your VM and attaches it to whichever device you choose. Stick to the “Default Adapter” here unless you know what you’re doing. This will let other devices on your network connect to the VM.
  • Host-Only Network: also creates a new IP address for your VM, but only lets your Mac connect to the instance. Other devices on the network won’t be able to connect (more secure).

Pick Bridged (Default Adapter) or Host-Only, then start your VM.

Configuring CentOS

We need to find out which IP our instance has. The easiest way to do this is to run ifconfig:

The second line of the output holds our answer: “inet addr: 10.x.x.x”. Make a note of this address, you’ll be connecting to your VM via this IP.

Next we need to make sure that the SSH demon allows outside root connections. You do this by hacking the following file:


Make sure the following two options are commented out (i.e. do not have a # in front of them):

If you had to un-comment either line, make sure you restart the SSH demon:

Login to your instance via SSH

If all went well you should now be able to open a Terminal window on your Mac (or any machine on the same network if you’ve selected the “Brided” option in Parallels Desktop) like so:

Obviously, replace with your own IP address.

Watch the screencast


Catch this episode on my WP Guru Podcast:

About Jay Versluis

Jay is a medical miracle known as a Super Survivor. He runs two YouTube channels, five websites and several podcast feeds. To see what else he's up to, and to support him on his mission to make the world a better place, check out his Patreon Campaign.

2 thoughts on “How to SSH into a Virtual Machine in Parallels Desktop

  1. I want to be able to ssh into the VM, but also on the VM be able to access the VPN client running on the host machine (in this case a Mac). If I switch to a bridged connection as you instruct here, yes I can ssh into the VM, but I no longer have access to the host VPN from the VM. Is there a way to have my cake and eat it too?

Add your voice!