I have a VirtualBox running an Ubuntu OS. I'd like to access this Ubuntu machine using ssh or telnet. In order to do that I've performed the following steps:
sudo apt-get install telnetdsudo /etc/init.d/openbsd-inetd restart
Then I tried to access this system using telnet from another machine but unfortunately the connection become timed out:
# telnet 10.125.31.176
Trying 10.125.31.176...
telnet: connect to address 10.125.31.176: Connection timed out
telnet: Unable to connect to remote host: Connection timed out
Also I'd like to mention that I could easily ping this machine (both ways):
# ping 10.125.31.176
PING 10.125.31.176 (10.125.31.176) 56(84) bytes of data.
64 bytes from 10.125.31.176: icmp_seq=1 ttl=57 time=2.34 ms
64 bytes from 10.125.31.176: icmp_seq=2 ttl=57 time=1.81 ms
EDIT: I have also performed the open ports scan and it seems ok:
$ sudo nmap -p 20-2550 localhost
Starting Nmap 5.00 ( http://nmap.org ) at 2012-06-11 15:31 IDT
Warning: Hostname localhost resolves to 2 IPs. Using 127.0.0.1.
Interesting ports on localhost (127.0.0.1):
Not shown: 2526 closed ports
PORT STATE SERVICE
22/tcp open ssh
23/tcp open telnet
25/tcp open smtp
587/tcp open submission
631/tcp open ipp
Nmap done: 1 IP address (1 host up) scanned in 1.54 seconds
EDIT2: ifconfig from the VirtualBox Ubuntu:
eth0 Link encap:Ethernet HWaddr 08:00:27:0d:43:7d
inet addr:10.125.31.176 Bcast:10.125.31.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe0d:437d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9247631 errors:0 dropped:0 overruns:0 frame:0
TX packets:10147 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3145994247 (3.1 GB) TX bytes:727714 (727.7 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:30446 errors:0 dropped:0 overruns:0 frame:0
TX packets:30446 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1280714 (1.2 MB) TX bytes:1280714 (1.2 MB)
Windows IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : xxx.com
IP Address. . . . . . . . . . . . : 10.125.31.170
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.125.31.1
Ethernet adapter VirtualBox Host-Only Network:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.56.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Any ideas?

ifconfigon both host and VM please? – Alex Chamberlain Jun 11 '12 at 13:05