Search code examples
windowsmacossshopensshssh-tunnel

How SSH Tunnel from Windows VM to the host system, which is running Mac


I am trying to ssh tunnel from a Windows VM to the host system, which is running Mac.

I am running this command:

ssh -L 80:localhost:5454 10.0.2.2

It then prompts me three times for a password like this:

Password:
Password:
Password:

Each time I enter my password for the windows vm, and it then prompts me for another password:

John [email protected]'s password:

Now this I think is the password I am using for my Mac host system, but it says permission denied and thats it.

So my question is what are these passwords referring to? My ssh password? Even though I have never set one of these up.

Any help would be great!


Solution

  • Because you have not specified otherwise - you are trying to use your Windows username to authenticate on the Mac.

    I assume these username are not exactly the same.

    From the Mac run

    whoami
    

    Which will print out your exact username, then from Windows, add that username in front of the IP when connecting.

    ssh [email protected]
        /\
    

    You will then be prompted for the password of the user on the mac.