This question already has an answer here:

I cannot seem to get an ethernet connection to the raspberry pi from ubuntu. It does not find the pi on ifconfig. The ip address of the raspberry pi is static, so should be When I ping to it I get a response, but when I attempt to ssh connect I get:

"ssh: connect to host port 22: Connection refused"

Any advice on how to connect please?

marked as duplicate by Dmitry Grigoryev, Milliways, Ingo, Darth Vader Jul 27 at 9:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


You have an Ethernet connection. If you didn't the ping would not work.

You don't say how you have enabled the SSH server on the Pi.

If you haven't you could enable the SSH server by one of the following methods.

  • If you can login then run raspi-config (sudo raspi-config)
  • If you have an SD card reader in your Ubuntu box insert the Pi's SD card and create an empty file called ssh in the boot partition (the small FAT partition on the SD card).
  • The raspberry pi has compiled code on it. I wish to take the data off using a tcip connection. I have managed this task before but it has stopped working. SSH is enabled, but does not seem to work – Sam Jul 18 at 12:41
  • @Sam You need to edit your question and add all relevant information. – joan Jul 18 at 13:31
  • ssh is not enabled(or not configured), hence the connection refused message. This means the port is open, the pi is online, but there is nothing that wants to accept the connection. – Chad G Jul 19 at 16:32

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