Brand new Ubuntu LTS 10.04.2 install (and updated), with sshd running. I added a host-only adapter. and configured it like this:

auto eth1
iface eth1 inet dhcp

I can ssh from the guest to itself over eth1's ip address.

I cannot ssh from the host to the guest over that same IP address:

$ ssh 192.168.56.102
ssh: connect to host 192.168.56.102 port 22: Permission denied

From the Host:

$ ifconfig vboxnet0
vboxnet0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 0a:00:27:00:00:00 
inet 192.168.56.1 netmask 0xffffff00 broadcast 192.168.56.255

Fromt the guest:

eth0      Link encap:Ethernet  HWaddr 08:00:27:2b:8d:34  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe2b:8d34/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17 errors:0 dropped:0 overruns:0 frame:0
          TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2697 (2.6 KB)  TX bytes:2378 (2.3 KB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:e8:60:0e  
          inet addr:192.168.56.102  Bcast:192.168.56.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fee8:600e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1180 (1.1 KB)  TX bytes:1152 (1.1 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)
link|improve this question
Try changing the host adapter to bridged. – Joe Internet May 16 '11 at 19:27
bridged networking works. But I want a static IP address that won't change based on the network I'm connected to. – crankharder May 16 '11 at 22:58
Ok, I tested it on Win7/Mint, and had no problems connecting over either adapter. Take a look in the /etc/ssh/ssd_config file and make sure that it's not excluding the eth1 address. Also check any firewall settings to see if the address is being blocked. – Joe Internet May 18 '11 at 2:41
feedback

1 Answer

In my case the permission denied was caused by Cisco Any Connect VPN software that was running wild. After quiting it the connection to vboxnet worked as expected.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.