4

I just bought a raspberry Pi 3. I am trying to run it but first it wrote connection refused on ssh attempt. After I ran the raspi-config and enabled the ssh I now get a Connection closed by 192.168.0.31. When I scan the ports on that machine the 22/tcp is open (using nmap). What could be the problem?

durisvk
  • 927
  • 2
  • 12
  • 24

2 Answers2

8

I just found this solution, now the ssh works:

sudo rm /etc/ssh/ssh_host_*
sudo dpkg-reconfigure openssh-server
durisvk
  • 927
  • 2
  • 12
  • 24
0

I was also getting the same problem. So I tried the following solution. 1. Try to create an empty SSH file without any extension in RPI bootable file. 2. Try to execute sudo systemctl enable ssh sudo systemctl start ssh during boot time, using .bashrc file

Harsh
  • 149
  • 2
  • 11