1

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: 192.168.1.2, Bcast:192.168.1.255. 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. – Thorbjørn Ravn Andersen Jan 7 '14 at 1:16
  • Umm.. What do you mean by distribution? I enabled ssh in raspberry already.Is that what you mean? – Jane Alvord Jan 7 '14 at 2:46
  • Distribution means the variety of OS that you are using - i.e. Raspian Wheezy, Ubuntu, Fedora, etc. – Greenonline Feb 8 '16 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. – techEmbedded Feb 8 '16 at 9:20
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 192.168.1.2. 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. – Jane Alvord Jan 7 '14 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. – Jane Alvord Jan 8 '14 at 1:36
  • After trying to solve this problem ,my raspberry pi cant read my /etc/network/interfaces – Jane Alvord Jan 10 '14 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 '14 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:192.168.1.5 Bcast:192.168.1.255 Mask:255.255.255.0 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 "192.168.1.1 -c10" – Jane Alvord Jan 15 '14 at 1:50
-2

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

protected by Community Feb 8 '16 at 10:22

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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