I have a Raspberry Pi and I have updated with the latest image.

I have activated SSH and I have verified it is running using the command service ssh status.

However, when I connect to it with putty in Windows or run ssh -x < Raspberry Pi IP addr > -l pi, the connection is refused.

I don't understand what I am missing?

  • Have you configured it to require keyed authentication rather than password authentication? Oct 8, 2012 at 12:11
  • 4
    Ok, if you get a connection refused then the daemon is not listening on port 22 (or isn't running at all). First, do a ps afxu | grep sshd and add the output to your question. If the daemon is running, try to run ssh -vvv <ipaddress> and paste into your question a few lines of output before ssh hangs or refuses the connection. If you have a monitor and keyboard attached to your Pi, you can also try a ssh -vvv localhost directly on the Pi to see if at least this works.
    – Avio
    Oct 8, 2012 at 12:25
  • 1
    At first, I assume you want ssh -X not -x Second: Doublecheck the raspi's IP address with ifconfig Third: ssh -vvv will tell you, if your configuration is not correct, or permissions aren't set properly.
    – macrojames
    Oct 8, 2012 at 14:07
  • 4
    You could also grep the output of netstat -n for port 22. And you might want to make sure that what is answering at that IP address is actually the pi, and not something having an address conflict with it - you might for example do arp -an on your development box and look up the first three octets of the MAC address corresponding to that IP - it should match the pi - if it belongs to someone else like Dell or Cisco you know it's not the pi you have been talking to. Oct 8, 2012 at 16:04
  • On the client, ssh -v would give more detailed error messages.
    – bortzmeyer
    Oct 9, 2012 at 20:37

1 Answer 1


You probably have the wrong IP address. To show the IP, type this command on the Pi:

ip -s addr

The, there should be an IP address beginning with 192.168 or look for the "inet" address associated with your eth(typically 0) interface. Try the SSH command again with that IP address.

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