Dogga85
Posts: 28
Joined: Mon Dec 19, 2016 10:15 pm

Connection refused when trying to SSH

Sat Jun 22, 2019 7:42 am

Hi all,

I'm trying to SSH with Putty to my Raspberry Pi 3 B+ but get the error Connection Refused. I'm using Windows 10 and AVG Internet Security. I'm using the correct IP, I have enabled SSH on the RPi through the config interface. My PC and RPi are both connected to the router via Ethernet. I've tried opening port 22 in windows and AVG. What am I doing wrong?

pcmanbob
Posts: 6240
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Connection refused when trying to SSH

Sat Jun 22, 2019 10:12 am

You should not be opening port 22 on your windows PC that would be for incoming connections.

did you use

Code: Select all

sudo raspi-config 
to enable SSH ?

To be sure you could just create a file called ssh or ssh.txt by putting the SD card back in your windows PC.

once you reboot your pi you should see the ssh file disappear which would mean ssh is enabled.

may I ask how you know you have the correct IP do you have a screen connected to the pi ?

can you ping the pi from your windows PC ?
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
HawaiianPi
Posts: 4240
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Connection refused when trying to SSH

Sat Jun 22, 2019 10:38 am

Try SSH into pi@raspberrypi.local.

Or ping raspberrypi.local to double check the IP address (assuming you don't have other Pi computers with the default hostname).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Dogga85
Posts: 28
Joined: Mon Dec 19, 2016 10:15 pm

Re: Connection refused when trying to SSH

Sat Jun 22, 2019 7:02 pm

Thanks I'll try creating the file. I used the GUI to enable SSH. I do have a monitor connected to the Pi. I can ping it, and also created a DHCP reservation for it on my router so it's IP never changes.

Return to “Networking and servers”