The IP address of your Windows host is not the same as the IP address of your virtual machine. In addition localhost on your virtual machine refers to the virtual machine. The localhost of Windows refers to the Windows host.
When you connect from the virtual machine, you must specify the IP address of your Windows host.