I just got a RPi2 Model B a few weeks ago and just started to program with it. I am trying to connect to the Internet for the project I am doing. So the OS is installed on my SD the only problem I am having is connecting to the ethernet and Wi-Fi.

I have installed Raspbian Wheezy on it. When I have the Pi hooked up to the ethernet. So I looked for the IP and found

I open putty and have on port 22 and on port 23. And no matter what I have done it will not let me ssh into it. It keeps saying Connection Refused

I have completely installed and setup the Pi with Raspbian Wheezy. And it is in graphical mode when I last plugged it in to my TV.

Do I need to switch it back to the terminal or does it not matter? The Main question is what is preventing me from SSHing into this device?

NOTE 1: I have gone into sudo raspi-config Enabled SSH and no luck

NOTE 2: None of my IP's interfere with each other!!

  • what is the ip of the computer you are using to connect to your pi? can you ping It shouldn't matter but can you ssh using What is the output of sudo service ssh status? Dec 30, 2015 at 8:31
  • 'Connection Refused' is a very generic message. SSH is, by default, on port 22 so 23 is out of the question. You can connect only from your LAN; to get external (public) access you need to forward port 22 on your router to the, possibly static, RPI address and find the router's 'public IP'; in this case the IP is never on the 192.168.*.* family.
    – fcm
    Dec 30, 2015 at 14:06
  • "Do I need to switch it back to the terminal" No that doesn't matter, it doesn't matter if you have it on terminal mode or on graphical mode. Are you sure you are connected at the same network where your Pi is connected to?
    – Michielvk
    Dec 30, 2015 at 14:58
  • @SteveRobillard I know that my IP's are completely different from anything else. Dec 30, 2015 at 17:23
  • @Fcm hmmm. I'm not to sure about that if all else fails I will try this. Dec 30, 2015 at 17:26

3 Answers 3


Raspbian jessie does have ssh enabled by default, I don't know if wheezy have ssh enabled by default. What I recommend doing is:

  • Go to the terminal

  • And type: sudo raspi-config raspi-config
    (source: raspberrypi.org)

  • Go to advanced options raspi-config advanced options

In the advanced options will be an option to enable/disable ssh. raspi-config advanced options ssh

There you can enable SSH raspi-config advanced options ssh setting

More information here: https://www.raspberrypi.org/documentation/remote-access/ssh/

  • But I have done that already! Let me go into it again and re-setup and see if it works. Dec 30, 2015 at 17:19
  • Nope. redid the config and still no luck! Dec 30, 2015 at 17:57

I figured it out! I had 2 digit wrong. DCHP was not telling me correctly so I had to use nmap to find it. I was using Which was wrong. and the port works as 22

  • 1
    Don't forget to mark this answer as correct (grey check mark). It's just that people know that this topic is answered.
    – Michielvk
    Dec 31, 2015 at 11:10
  • @Michielvk I had to wait until I could mark it as an answer. It wouldn't let me till today. Jan 1, 2016 at 20:04

Usually this means you haven't set-up the sshd on the Pi properly (or at all) - it isn't installed by default.
Can you actually ssh from the Pi to itself (hook it back to your TV & try it)? If not then ensure sshd is installed & check the config file /etc/sshd_config - once you can do this locally then it should work from outside - check firewalls & port-forwarding if not.

  • 1
    As far as I know, sshd is enabled by default in raspbian. But since OP has not mentioned which os he is using, this can be the probable cause. Dec 30, 2015 at 9:05
  • I did go to this! but nothing seemed to exist here. I've read all the files. I'll try again, but this doesn't seem like it's gonna work. Dec 30, 2015 at 17:28
  • 1
    @YamIanon I'm so sorry. I somehow missed that detail. Glad to know that your problem has been solved. Dec 30, 2015 at 18:21
  • @dastaan It's fine. Sorry If I seemed to be rude at all. Anyway thank you for your help anyway. :D Dec 31, 2015 at 2:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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