I have a Raspberry Pi and it works well on my TV with keyboard and mouse, but it is not practical at all to work on my TV so I want to view it on my laptop. I did as shown on many tutorials, with PuTTy (via SSH) or TightVNC Viewer, but it never works. When I type the IP of my raspi and try to run it, it never works because 'operation times out'.

On my PC I have Windows10, and Raspbian on my Raspi2B.

Thx for helping.


  • 1
    Is your Pi on a static address? Is SSH enabled on the Pi? Are you sure your have the correct login credentials? Is your username authorized for SSH? Can you reach the Pi through your network (try a ping command)? – tlhIngan Dec 4 '16 at 21:48
  • 1
    "try to run it" - obviously you are using the wrong it - seriously if you want help you need to say EXACTLY what you are trying and the EXACT response. – Milliways Dec 4 '16 at 22:20
  • You have a routing problem. – goldilocks Dec 5 '16 at 5:06
  • Sorry for the delay and the stupid error. I just wasn't typing the right IP. Meanwhile, I managed to connect the pi and use the console, but only in PuTTy with SSH, not in TightVNC. It's not a big deal if I can't open the GUI because I can open it on my TV. I may try to solve it later if I really need it. – Hugo Trombert Dec 7 '16 at 13:39

it never works because 'operation times out'

There are only two or three ways for this to happen:

  1. The Pi is running a firewall which intentionally drops packets. This is unusual and would not happen by accident, so unless you've set it up that way, this is not the cause. It's also possible some other firewall between the Pi and your computer is doing it, but that too is unlikely: Firewalls do not normally drop packets, they reject them, meaning you get a response right away telling you you cannot connect. However, they can drop them if they are intentionally configured to do so, so this is still a possibility, just an unlikely one.

  2. The IP address is incorrect or otherwise not usable to reach the pi from where you are.

  3. You have incredibly bad network latency.

Realistically, you can cross #3 off the list. Presuming #1 is also out of the picture, that just leaves #2. This could also be called a routing problem and the general point is the request is not reaching the Raspberry Pi for some reason; this could be because the Pi is misconfigured or because it is not connected to the same network. It is possible for the pi to be connected to the outside world via your LAN but not correctly routed to from inside. You should try looking for it with a port scanner, packet sniffer, or ping request. I believe by default it responds to pings if it receives them, and a port scanner will tell you if port 22, the SSH port, is open.

There are no other possibilities. That is the nature of IP based networking.

Port scanners (there are many, you can get easy-to-use smart phone apps as well, just search for "port scanner") will usually look up MAC address OIDs; the Raspberry Pi Foundation have one (B8:27:EB) which is used with all onboard NICs, so if it is connected via ethernet (or a Pi 3's built-in wifi), the scanner should identify it clearly as a "Raspberry Pi Foundation" device, and/or the first three parts of the MAC address should be b8:27:eb.

Of course, if you are using a USB wifi adapter, that won't be the case. However, you can easily get the MAC address of the adapter either directly on the pi (look at sudo ip link output) or by sticking it in another computer. If you then cannot find the IP address with a port scanner showing that MAC address, then this is conclusive proof of the routing problem. If you can but other applications still time out, this may be indicative of the ARP problem mentioned below.

There isn't enough information in your question to suggest much about how to solve it, but if I had to guess, I'd say it is either:

  • Because the Pi is connected via ethernet and you are using wifi on your laptop, and while the Pi is being allowed to establish connections to the outside world and have replies routed back to it, ARP exchanges on the LAN aren't being routed properly, so the laptop can't connect to the Pi.

  • Because you are connecting the Pi directly to the laptop with an ethernet cable and are confused about the actual IP address used in that scenario.

| improve this answer | |
  • Okay -- but that's a separate set of questions. Please take the tour to understand better how the site works. If you believe I am correct about your original problem (it sounds like I am), please tick this as the answer here because it would be nice to have a straightforward Q&A about a common problem/mistake. Keeping distinct questions compartmentalised makes it easier to have things that are of wider use value to posterity, so it does not have to be repeated in a customized form for each person. – goldilocks Dec 7 '16 at 13:33

Is ssh running? The default has recently changed to have it turned off. ssh can be enabled on first boot by creating a file called “ssh” in /boot. As /boot can be written to by any OS that understands SD cards, this extra step is easily done on first installation. It does not need to be done again with the same card image.

| improve this answer | |
  • As you state that is to ensure ssh is "enabled on first boot". The OP already has a running system. – Milliways Dec 5 '16 at 3:32
  • If ssh were not running, then there would be nothing listening on the port. In that case the TCP/IP stack, which is part of the operating system kernel, responds immediately with a RST/ACK packet. This will be reported at the other end as "connection refused" or something similar (as opposed to "network unreachable" or "prohibited", which indicates an ICMP denial from a firewall). If an operation times out, it is because the application did not receive any response at all. – goldilocks Dec 5 '16 at 4:24
  • That will only happen if either the address is non-existent, or the system with the address is intentionally trying to pretend it isn't there. In other words, a time out does not happen because SSH isn't running -- although it may not be, it does not matter whether it is or isn't, because no request is reaching the pi. These kinds of exchanges are easily observed via packet sniffing and are predictable based on the relevant protocols. There is no element of mystery, chance, etc. – goldilocks Dec 5 '16 at 4:25
  • The /boot/ssh file should enable ssh after any boot, not just the very first. At least, that's what I get from reading this from the RPF: raspberrypi.org/blog/a-security-update-for-raspbian-pixel And when did it start getting so fighty in here? This is one of the prime answers sites for a beginner's computer. The OP may not have asked the Perfect Question according to the Dicta of St Eric of Raymond, but they have a computer that doesn't work, and they want to be on the path of knowing why and fixing it – scruss Dec 5 '16 at 13:39
  • @scruss I'm sorry, I'm not trying to be "fighty". After I posted those comments I realised my own answer was a bit abbreviated, so I added some stuff to better explain my point: Until the routing problem is dealt with, fiddling with is or is not sshd running won't matter -- right now the time out indicates the connection request isn't reaching the remote node period. – goldilocks Dec 5 '16 at 13:54

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.