I'm trying to use SSH for the Raspberry Pi so I can control it from my PC.

I followed the youtube video Raspberry Pi - How to SSH - Remote view your Pi... but the result was "connection refused".

My Raspberry Pi is using a Wi-Fi dongle connected to the router which has a ping of inet addr:, Bcast: I'm using X11 as a forwarder, which was used in the link.

So what is the mistake have I made? Do I need to download something for my PC, to use SSH, or is PuTTy enough?

  • 1
    Depends on the distribution you use - you most likely need to enable ssh explicitly in the distribution configuration tool. Jan 7, 2014 at 1:16
  • Umm.. What do you mean by distribution? I enabled ssh in raspberry already.Is that what you mean? Jan 7, 2014 at 2:46
  • Distribution means the variety of OS that you are using - i.e. Raspian Wheezy, Ubuntu, Fedora, etc. Feb 8, 2016 at 6:54
  • 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. Feb 8, 2016 at 9:20

2 Answers 2


Putty is more than enough to SSH in. Firstly make sure you have installed an SSH server on your raspberry PI such as OpenSSH. Next make sure you can ping your raspberry PI's IP address using a ping command, in your case ping Press ctrl+c at anytime to stop pinging. If you are unable to ping your raspberry PI, then you know there is a problem with your raspberry PI even connecting to your local network.

If it is a success, connect to your PI via Putty. To connect to it via Putty, open putty, enter the IP of your raspberry PI under Host Name (or IP address) and 22 for the port. You should then be connected to the raspberry PI's terminal and be able to login.

If you get a connection refused (I believe this is where your at) the raspberry PI is not accepting connections on port 22. This is most likely due to an incorrectly setup SSH server. You should look into another tutorial for your specific distribution. Distributions are like flavors of Linux, you're most likely using one of these http://www.raspberrypi.org/downloads. Most likely Raspbian. A good tutorial for Rasbian is https://www.modmypi.com/blog/remotely-accessing-the-raspberry-pi-via-ssh-console-mode.

  • Your answer was easy and very clear to understand but I still have the same problem which is connection refused. My raspberry pi was coincidentally using raspbian and followed the link you gave. I've set up the static address,able to ping my gateway.everything was going smoothly till I connect the raspberry pi with putty > connection refused. Jan 7, 2014 at 7:58
  • I did some searching in "google" maybe that I'm using an ip address similar to one of the computer in my lab eventhough i don't think it is the reason for my putty to show connection refused. Jan 8, 2014 at 1:36
  • After trying to solve this problem ,my raspberry pi cant read my /etc/network/interfaces Jan 10, 2014 at 6:43
  • If your Pi could connect to the internet, changing to a static IP is not going to help, it only confuses the issue. Post the result of ifconfig.
    – Milliways
    Jan 14, 2014 at 3:30
  • I'm using a wifi dongle so i don't know whether the settings below is ok> wlan0 Link encap:Ethernet Hwaddr 00:0f:13:38:26:6d inet addr: Bcast: Mask: Rx packets:26 errors Tx packets:15 errors.I reformatted the sd card so its running fine already its just that my putty connection refused.even my pinggateway is alright as it could ping 10 times ping " -c10" Jan 15, 2014 at 1:50

if the ping fails, check your router settings => host isolation / or Wifi/ethernet isolation must be disabled.

Not the answer you're looking for? Browse other questions tagged or ask your own question.