0

I just installed my new raspberry PI 2, using NOOBS-lite with Raspbian. I have some trouble connecting via SSH from both my MacBook (WIFI, using the terminal) and my PC (Ethernet, using Putty). Most of the time, when trying to connect, I have a "timed out" issue. Sometimes I manage to connect (randomly, without changing anything), but after a few seconds, I get the error "Network error: Software caused connection abort". When I try the SSH connection directly in the terminal of my raspberry, no problem...

My Macbook, my PC and my Raspberry are all connected to a router. I use DHCP to set a static IP for the raspberry.

I tried to change the port in sshd_config, same problem. But I guess that if the problem was the port, I should be able to connect sometimes?

I spent the evening trying to find a solution on internet (mostly on this stackexchange), but none of the solutions which worked for people experiencing this issue solved mine.

  • If you are connected to the pi with a monitor and keyboard, what does pinging your router look like? This might help you determine if the connection problem is between your pi and the router, or your router and your mac. – portforwardpodcast Mar 31 '15 at 22:46
  • I didn't even think about it. Indeed I can't ping my router from my raspberry. Which is weird as I downloaded Rasbian from internet... But I switched the raspberry ip to static since then, could it be à problem? (I use static ip for future remote SSH connections) – s0ubap Mar 31 '15 at 22:58
  • And what about the randomness of this issue? – s0ubap Mar 31 '15 at 23:10
  • What wireless card are you using? does google find any similar issues with that model? Does this happen with wired internet? – portforwardpodcast Apr 1 '15 at 0:06
  • Yes, as I mentioned, this also happens when using Putty on my PC connected via ethernet. – s0ubap Apr 1 '15 at 6:27
1

I had the same issue and just found this solution to work for me:

$ sudo rm /etc/ssh/ssh_host_* && sudo dpkg-reconfigure openssh-server   
  • While this answers the question, it doesn't explain why this command would help. A better answer would you expand on that so the user could learn, rather than just copy and paste solutions. – Jacobm001 Feb 13 '17 at 16:35

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.