I tried to connect to RPi via SSH using PUTTY on Windows10. But it said "Network error: connection timed out".

It worked yesterday. I re-installed the OS onti the RPi, still doesn't work.

Here is what the RPi command line says:

pi@raspberrypi:~ $ ssh [email protected]
The authenticity of host ' (' can't be established.
ECDSA key fingerprint is SHA256:pvuAPomAEMekCCNwAAdCui255rILwTu/+KydOrr9AFU.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '' (ECDSA) to the list of known hosts.
[email protected]'s password: 
Linux raspberrypi 4.14.34-v7+ #1110 SMP Mon Apr 16 15:18:51 BST 2018 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Jun  8 10:30:17 2018

Here is what my windows console says: enter image description here'

I am using this for a motion camera. The camera is fine. If I typed in into the chromium RPi browser. It will show me the live stream.

Definitely not PUTTY software problem. JuiceSSH app on my phone cannot connect either.

Edit. full result of ssh -vvv [email protected] -p 22

Edit2. I changed the wlan0, inet in ifconfig.(giving it a static address.)Still doesn't work.

  • In general be VERY careful when you see "The authenticity of host..." The new host you connect to could be anywhere on the internet. Accept only if you know the host is on the local subnet or has an expected IP. In this case you're safe because it shows you your Pi USB camera.
    – OyaMist
    Jun 8, 2018 at 15:56
  • 3
    @OyaMistAeroponics In this case, the OP is actually connecting from the Pi to the Pi on its own address. This notice appears any time you connect to a device you haven't before. In this case it should be expected. It is very rare to SSH to yourself.
    – stevieb
    Jun 8, 2018 at 17:12
  • wow. i missed that. I will delete my answer. thank you.
    – OyaMist
    Jun 8, 2018 at 17:43
  • Might be worth checking Windows PUTTY configuration to see if it is using an old IP if RPi has new IP allocated by DNS.
    – OyaMist
    Jun 8, 2018 at 17:53
  • 1
    Almost certainly not a Pi problem - by reinstalling OS you changed ssh keys. Most systems see this as a security issue
    – Milliways
    Jun 8, 2018 at 22:36

1 Answer 1


When you re-install OS on the SD card, the public key for SSH on the SD card changed even though the host name (i.e. [email protected]) remain the same, but your computer (SSH client) still have the old SSH public key for the host [email protected] in the caches. What you need to do is to remove the old SSH key for host [email protected] from your PuTTy caches.

For Mac users, this can be done easily editing the known_hosts file using a text editor and delete the key corresponding to the host ip address:

sudo nano ~/.ssh/known_hosts

I'm not a Windows users, but a quick search show that you can delete the outdated keys from PuTTy based on this instruction.

  • There are a two. A default and the other one. I delete that other one. SSH still doesn't work. Jun 11, 2018 at 13:29
  • try to log in using ssh [email protected] if you are using Raspbian.
    – hcheung
    Jun 11, 2018 at 14:05
  • It says "The authenticity of host 'raspberrypi.local (' can't be established" then I said yes to continue, It asked me for password. I kept typing raspberry and getting permission denied. Jun 11, 2018 at 14:21
  • So the ssh works, but you have wrong password, what password you type in? by default for newly flashed SD card, it should raspberry
    – hcheung
    Jun 11, 2018 at 14:29
  • I changed the password. It works now.But when I tried ssh using PUTTY it said "Network error: connection timed out". I tried LemonSSH on Android. It's not connecting either. Jun 11, 2018 at 14:43

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.