1

I want to enable SSH on OSX from only my Parallels VM. My fear is that by opening SSH I'm putting my host OS at risk for remote exploitation.

How can I configure MacOS to only allow connections from the local Parallels' Windows machine?

Perhaps I can establish a dedicated VNet for the two machines, but I'm not sure how to restrict MacOS to listen only that subnet / IP address.

  • If you already have SSH running, how are you "opening it more broadly" if you are connecting from a VM on that machine? Assuming you're using a bridged network, it's just another node on the same subnet. If you're using host only, then it will only connect the VM and host. – Allan Mar 21 '18 at 17:00
  • @allan Regardless of the parallels configuration, MacOS SSH will listen on all subnets and virtual machines. Ideally I want to restrict by both interface and source IP. Both will remain static on localhost – random65537 Mar 21 '18 at 18:09
  • I understand how SSH works on a Mac. I am trying to understand what you want to do in the context you described. So, what I am understand from your comment is that you want to lock down SSH so it communicates only between the VM and the host. Correct? – Allan Mar 21 '18 at 18:28
2

You can edit /etc/ssh/sshd_config and set the parameter "ListenAddresss" to only the IP-address your host Mac has on the dedicated VNet you have create between the host and the virtual machine (host-only networking).

Remember to remove:

  ListenAddress 0.0.0.0
  ListenAddress ::

and replace it with just:

  ListenAddress 176.16.236.111

(where 176.16.236.111 should be replaced with whatever your IP-address is on that private network)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .