I tried to SSH into my Pi using PuTTY, but I got an error:

Network Error: Connection timed out

I have checked my router, noted that the device is indeed connected to the network, I was able to use the internet to search Google on the Raspbian OS (that required a dedicated monitor and keyboard and mouse which is troublesome). but what I want is to be able to SSH into the OS wirelessly.

I have managed to use port forwarding, and connected via SSH into the Pi through the router IP address, but once inside, I could not do anything that required wireless input, such as updating the RPi or cloning from GitHub etc, it just shows as errors.

sudo route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    303    0        0 wlan0   U     303    0        0 wlan0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet  netmask  broadcast
        inet6 fe80::ba27:ebff:feb2:2c6c  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:b2:2c:6c  txqueuelen 1000  (Ethernet)
        RX packets 60  bytes 8148 (7.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 83  bytes 13665 (13.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ping google.com
ping: google.com: Temporary failure in name resolution
  • I assume that you have enabled ssh via sudo raspi-config or by putting a empty file called ssh on the sd card, right?
    – Luis Diaz
    Sep 20, 2017 at 12:35
  • yes, i actually put an empty file, and repeated enabling ssh on the sudo raspi-config as well
    – Liquified
    Sep 20, 2017 at 12:38
  • try using ping and your ip to see if you can reach the pi with your computer
    – Luis Diaz
    Sep 20, 2017 at 12:43
  • it shows destination host unreachable weird
    – Liquified
    Sep 20, 2017 at 12:44
  • Are you using the ip or localhost to try it? Also, I don't think that it's going to be an issue.. but let's try.. are the pi and the pc both wireless or wired?
    – Luis Diaz
    Sep 20, 2017 at 12:46

3 Answers 3


Network Error: Connection timed out

There are only two ways that can happen:

  1. The system you are trying to reach is running a firewall configured to silently drop packets. That is not a good practice -- it is better for all concerned that the firewall explicitly reject a connection -- and you would have had to intentionally configure it that way yourself.

  2. There is no system on the network using the IP address you are trying to reach.

Note that "SSH is not running" is not on that list. If this were the problem, you would immediately get "Connection refused", because the operating system does in fact reply if no application is using the relevant port.

I have observed that it is possible for a system to be assigned an IP address that works to initiate and maintain connections, but the router still fails to route other parties who wish to initiate a connection with it (i.e., the Pi can access the LAN and internet, but nothing can access it unless the connection was initiated from the Pi).

  • theres definitely the ip address on the network as i am able to see it on the router map in the router settings section. it might be firewall configured, but im not sure if theres a firewall configured to drop packets, is that a router option or a firewall on my pc option? i disabled firewall on my pc already
    – Liquified
    Sep 20, 2017 at 13:43
  • Neither your router nor the Pi would be doing that unless you intentionally configured it that way; as I said it is considered a bad practice. Just that's the only possibility beyond "destination (literally) unreachable". Nodes that can connect always reply to each other, even if it is to say, "I won't connect any further". But a timeout means there was no response at all.
    – goldilocks
    Sep 20, 2017 at 13:46

The first problem Network Error: Connection timed out is most likely the router. Some routers deny communication between clients (and there is an option to turn that off, usually). It's a Windows thing - virus protection... That explains you being able to connect using port forwarding.

The second error you get ping: google.com: Temporary failure in name resolution means that there is a problem with the DNS setup on the RPi. Check what you have in /etc/resolv.conf with cat /etc/resolv.conf. Try adding as first line nameserver and see if it works (this is Google's public DNS server). No idea what the problem could be, because you said logging in with keyboard and monitor makes DNS work (check /etc/resolv.conf in that situation also).


Update to the situation, I have decided to just use the alternative which is the use the OTG setup to SSH into the Pi instead of dealing with the internet related issues.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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