SSH from host machine Win7 to guest Fedora Machine in VirtualBox

I'm using VirtualBox on Windows 7 to run Fedora 7. I seem to have my SSH on, as /sbin/service sshd status tells me. When I do an /sbin/ifconfig, I get this:

eth0   Link encap:Ethernet  HWaddr 08:00:27:CF:5A:0B
       inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0

I do an ssh 10.0.2.15 from inside Fedora, and connect back to the guest machine.

When I do an ipconfig on my Windows machine, I get this information:

Ethernet adapter VirtualBox Host-Only Network:

    Connection-specific DNS Suffix  . :
    Link-local IPv6 Address . . . . . : fe80::b42c:a852:a0e8:1636%19
    IPv4 Address. . . . . . . . . . . : 192.168.56.1
    Subnet Mask . . . . . . . . . . . : 255.255.255.0

When I now use PuTTY, to connect to 192.168.56.1, it says connection refused. Connection to 10.0.2.15 times out.

SSH service is running. I have disabled SELinux. Also, I have allowed ssh as a trusted service in system-configure-securitylevel. I have tried to switch the firewall completely, but it turns back on automatically.


Solution 1:

Found the solution. The manual contains it all. Thanks Bender.

VBoxManage setextradata "Linux Guest"
"VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/Protocol" TCP
VBoxManage setextradata "Linux Guest"
"VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/GuestPort" 22
VBoxManage setextradata "Linux Guest"
"VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/HostPort" 2222