4

With reference to the post SSH for Raspberry Pi using a PC, I tried the same steps and got the same error:

Network error, connection refused

In the post I mentioned, I saw an answer mentioning "install ssh on Raspberry Pi".

How do I do it when I haven't been able to set it up? Is there a file which I can copy on to the SD card through my Windows laptop, or is there a software for that also?

  • Assuming you are using a recent Raspbian ssh will be running. What distribution are you using? You need to tell us more about what you are trying to do (and also if you have changed any settings). – Milliways Feb 8 '16 at 7:14
  • Is the IP settings - Configured Static / Dynamic --- Windows machine? If it is dynamic - it will have IP 169... If it is static - it will have IP 192... Could you please check that? Disable the internet connection in your machine/host/computer. ifconfig /all - To get the machine/host/computer ip. What is there in cmdline.txt file, does your ip match? Just a note(need not be necessary, but I am following this): Always add from the machine/host/computer ip + 3 to your raspberrypi board. Try disabling and enabling the interface card of your machine/host/computer Hope this helps, Please let me kno – techEmbedded Feb 8 '16 at 9:22
  • For some dunderheaded reason, ssh is not enabled on Raspbian lite, so if that's what you installed there's a problem. raspberrypi.stackexchange.com/a/41893/5538 – goldilocks Feb 8 '16 at 11:32
1

Your answer could be here: Connect to Raspberry Pi over ssh: connection refused (from putty)

As in this question is asking to solve the error: Network error, connection refused error form Putty.

1

Raspbian Lite has SSH Disabled by Default. I have an open source windows tool for setting up wifi and ssh on github, click on "Releases" for a compiled exe.

Raspberry-Pi-Wifi-Setup-Tool

Otherwise: Are you sure your raspberry is on the network? if so you need to create a file called 'ssh' with no extension.

  • Mod Note to the community: Offering a link to self published software that both answers the question and is not for sale is a perfectly valid answer. This does not count as spam. – Jacobm001 Sep 26 '17 at 14:15
  • That being said... Nice job on that repo, Dr.Rabbit. – Jacobm001 Sep 26 '17 at 14:16
  • @Jacobm001 Thanks for the Mod Note, I wasnt totally sure. Feel free to improve the software, wink. – Dr.Rabbit Sep 27 '17 at 16:33
0

If its raspberry pi b+ than it will take 10 sec to boot up. When you are connecting with ssh wait for sometime and than try it.

And its good that the error is this or may be its "connection reset by peer" they all comes when its booting up. some electrical fault did some interrupt and your connection will be lost but after some time or by restarting it you can connect it via ssh

0
  • Your Pi might be actively blocking connections. Flush all iptables entries using the commands:

    iptables -F 
    iptables -t nat -F
    iptables -t mangle -F
    iptables -X 
    
  • Next on the checklist is that Windows firewall or your antivirus might be blocking the connection. Disable it.

  • If it's still dead, try to check your router settings. Maybe someone enabled "Network Isolation" or "Partitioning". It's most probably in the WiFi settings.

  • Last but definitely not least, maybe you forgot to enable the SSH service. You can enable that by running sudo raspi-config, going to Advanced options, going to SSH, highlight Enable, then press enter. Reboot if required.

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.