How can I SSH directly into a VMWare virtual machine from an external computer?

AlwaysQuestioning picture AlwaysQuestioning · Aug 27, 2015 · Viewed 20.4k times · Source

I am running Kali Linux on Virtual Box on my personal computer. There is another computer on the same network that has a virtual machine on it. I want to SSH directly from Kali Linux (on my computer) into that other computer's virtual machine directly.

I don't want to go through two steps (SSH into the other computer, then SSH into its virtual machine). The other computer uses VMWare Player as its virtualization software. Its guest is metasploitable.

Any ideas?

EDIT: The VM on the other machine needs to stay in NAT mode for my purposes.

Answer

Mingle Li picture Mingle Li · Aug 27, 2015

Is openssh-server installed on your Kali Linux VM? You'll need that thing if you want to SSH into it.

You can make sure by opening a terminal / console (on the console inside Kali Linux) and putting in:

sudo apt-get install openssh-server

Then ssh using:

ssh user@ipaddress:port

Does this work for you?