Ubuntu guest SSH access

Discussions related to using VirtualBox on Windows hosts.
Post Reply
asjkdvk
Posts: 3
Joined: 1. Jun 2013, 13:33

Ubuntu guest SSH access

Post by asjkdvk »

I really can't figure this out. I've done a lot of reading on this topic and tried every solution out there but none of them seem to work.

I have a windows7 host and ubuntu guest.
The first network adapter is NAT with portforwaring 80 22 2222 ?, the second one is host-only.
I am able to connect from host(windows) to guest(ubuntu) apache server on port 80, but the 22 port doens't work.
Putty keeps returning "Network error: Software caused connection abort"

Code: Select all

ipconfig -all
Windows IP Configuration

   Host Name . . . . . . . . . . . . : Andrei-PC
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

PPP adapter DIGI:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : DIGI
   Physical Address. . . . . . . . . :
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 172.22.15.85(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.255
   Default Gateway . . . . . . . . . : 0.0.0.0
   DNS Servers . . . . . . . . . . . : 193.231.236.30
                                       193.231.236.25
   Primary WINS Server . . . . . . . : 10.11.12.13
   Secondary WINS Server . . . . . . : 10.11.12.14
   NetBIOS over Tcpip. . . . . . . . : Disabled

Ethernet adapter Local Area Connection 2:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : TAP-Win32 Adapter V9
   Physical Address. . . . . . . . . : 00-FF-57-69-A6-56
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Ethernet adapter VirtualBox Host-Only Network #2:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter #2
   Physical Address. . . . . . . . . : 08-00-27-00-54-F5
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::1c3d:9746:5a39:4430%37(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.40.2(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.40.0
   DHCPv6 IAID . . . . . . . . . . . : 621281319
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-17-A4-54-18-00-1F-D0-5A-86-87

   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1
   NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter isatap.{5769A656-5CE1-4DAC-BB5E-AE8D8894F406}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter Local Area Connection* 9:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Teredo Tunneling Adapter
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   IPv6 Address. . . . . . . . . . . : 2001:0:9d38:953c:106e:b044:ad76:f3b9(Pref
erred)
   Link-local IPv6 Address . . . . . : fe80::106e:b044:ad76:f3b9%11(Preferred)
   Default Gateway . . . . . . . . . : ::
   NetBIOS over Tcpip. . . . . . . . : Disabled

Tunnel adapter isatap.{83559DA8-E903-4435-A578-125EF290F00B}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.{BBB866AF-FD66-43D0-91D5-6B0CDBD208C5}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #4
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:50:25:af  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe50:25af/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2072 (2.0 KB)  TX bytes:1776 (1.7 KB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:02:67:5b  
          inet addr:192.168.40.3  Bcast:192.168.40.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe02:675b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:628 errors:0 dropped:0 overruns:0 frame:0
          TX packets:626 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:49530 (49.5 KB)  TX bytes:50475 (50.4 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
ufw is currently disabled, i've tried disabling windows firewall, still no change.
It's annoying since the 80 port is working just fine but 22 doesn't.
OpenSSH works fine, or maybe it's poorly configured. I really have no ideea on how to fix this. Maybe you guys do.
Thanks !
Last edited by noteirak on 1. Jun 2013, 19:05, edited 1 time in total.
Reason: Added code markup
asjkdvk
Posts: 3
Joined: 1. Jun 2013, 13:33

Re: Ubuntu guest SSH access

Post by asjkdvk »

And I don't think it's the windows firewall blocking 22 because I managed to connect to another server through openvpn
asjkdvk
Posts: 3
Joined: 1. Jun 2013, 13:33

Re: Ubuntu guest SSH access

Post by asjkdvk »

I've managed to fix it by adding to /etc/ssh/sshd_config
ListenAddress 0.0.0.0
Post Reply