1

I am new to Ubuntu, I have it installed on my computer (not on a virtual machine) and I am trying to connect to my Ubuntu machine remotely through PuTTY. I am getting the IP address of the Ubuntu machine using ifconfig. I'm trying to connect to this IP address with PuTTY but I am getting the following error message:

Network Error: Connection Timed Out

As shown below:

Image showing "Network Error: Connection Timed Out" message from PuTTY

Can anyone help me?

  • You ubuntu system works fine, you should check your firewall settings from your local pc or maybe you have a firewall device at your lan. – user393844 Apr 1 '15 at 10:04
3

Well, AFAIR correctly you need the openssh server for that which is NOT installed by default.

So try

aptitude install openssh-server

and try again.

So when the openssh-server is installed, try to see if it is running and to which port it listens to.

E.G.

[simmel]@[mars]$ service ssh status
ssh start/running, process 1279

so mine is running, let's see to which ip(s) it listens to.

[simmel]@[mars]$ sudo netstat -tlpn
Aktive Internetverbindungen (Nur Server)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1279/sshd       

So it's running and listening on all interfaces, which is the way it's setup by default.

Now try to connect to the server from localhost, does this work?

[simmel]@[mars]$ ssh -p22 simmel@localhost
Enter passphrase for key '/home/simmel/.ssh/id_rsa': 

It's working too. So the service itself is up an running and waiting for connections.

Now go to the system from where you would like to connect and install nmap and then scan the system, you should see the open ports after the scan.

sudo aptitude install nmap

and then (as root)

nmap -sS 10.128.225.177

Starting Nmap 6.40 ( http://nmap.org ) at 2015-04-01 14:33 CEST
Nmap scan report for 10.128.225.177
Host is up (0.00075s latency).
Not shown: 995 closed ports
PORT STATE SERVICE
22/tcp open ssh

Nmap done: 1 IP address (1 host up) scanned in 8.45 seconds

Alternatevly you could try

telnet <ip-adress> 22

If both don't work your system def. blocks these request, possibly as suggested with a firewall. Most common is iptables. So give it a try and check on the system you installed the openssh-server

iptables -L

If it looks different like this

[simmel]@[mars]$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination   

an active iptables might be blocking these requests.

| improve this answer | |
  • First of all thank you for your answer. I wrote that command in terminal. As a response I got: "No packages will be installed, upgraded or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 488 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used." By the way using apt-get instal openssh-server I have installed it. But it is not working yet. – Ahmet Jorganxhiu Apr 1 '15 at 11:57
  • i updated my answer so you can try to narrow down the problem – s1mmel Apr 1 '15 at 12:41
  • thank you very much for your help. I have tried and it worked. Thank you again. – Ahmet Jorganxhiu Apr 1 '15 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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